| Author |
Topic |
|
handinugraha
Starting Member
8 Posts |
Posted - 2010-01-08 : 01:45:53
|
| need help on this issues "cannot specify a column width on data type timestamp"here is the line"DATE_POSTED" TIMESTAMP (6)" what is the problem with it ?thanks,Newbie to SQL Server |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-08 : 01:49:38
|
timestamp in SQL Server is not what it really means. You should use datetime datatype.refer to http://msdn.microsoft.com/en-us/library/ms182776%28SQL.90%29.aspx KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2010-01-08 : 01:53:04
|
| Just use :DATE_POSTED TIMESTAMPJack Vamvas--------------------http://www.ITjobfeed.com |
 |
|
|
handinugraha
Starting Member
8 Posts |
Posted - 2010-01-08 : 01:53:50
|
| if i change to datetime it gives me the same error..or there should another thing i have to change ? how about value inside the bracket ?i still havent understood..thanksNewbie to SQL Server |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-08 : 01:55:49
|
just DATE_POSTED datetimewithout the ()Do you have the SQL Server Books Online ? You can refer to it for the syntax etchere is an online version http://msdn.microsoft.com/en-us/library/ms130214%28SQL.90%29.aspx KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
handinugraha
Starting Member
8 Posts |
Posted - 2010-01-08 : 02:00:54
|
| @khtan no i dont have any books..coz my boss gave me straight away the real database , i dont have time to study on it.. :(yes it is working without the ()..thanks for the book's link :)Newbie to SQL Server |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-08 : 02:04:13
|
the SQL Server Books Online is a help file you can installed together with the SQL Server installation. If you don't have it, just google for it and download. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
handinugraha
Starting Member
8 Posts |
Posted - 2010-01-08 : 02:06:51
|
| if i have 2 variables using timestamp, when i execute it was saying that it cant be added because of 1 tables can only have one timestamp column.how can i add more then ?thanksNewbie to SQL Server |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-08 : 02:11:59
|
timestamp in Oracle and SQL Server are totally different. timestamp in SQL Server is actually the rowversion. Refer to the link i provided earlier.You should translate timestamp from oracle to datetime in SQL Server KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-08 : 02:14:33
|
quote: Originally posted by handinugraha if i have 2 variables using timestamp, when i execute it was saying that it cant be added because of 1 tables can only have one timestamp column.how can i add more then ?thanksNewbie to SQL Server
as suggested before you need to make them datetime. timestamp is just stored as a hex value which is used to represent change of status of record. so use datetime instead. |
 |
|
|
handinugraha
Starting Member
8 Posts |
Posted - 2010-01-08 : 05:09:59
|
| Hmm..how about in the insertion function, can it be used datetime also ?i ran it and is not recognized..Newbie to SQL Server |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-08 : 10:41:03
|
quote: Originally posted by handinugraha Hmm..how about in the insertion function, can it be used datetime also ?i ran it and is not recognized..Newbie to SQL Server
nope. you cant insert direct values to timestamp column. |
 |
|
|
|