Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server
Hi In my table i have column with timestamp datatype. here i am inserted datetime and smalldatetime and time but its not taking .
 
I am getting Incorrect Syntax error near datetime.
 
Please Help me...............
Posted 15-May-12 20:18pm
MAKReddy1.1K
Comments
Sandeep Mewara at 16-May-12 2:28am
   
Add what exactly you are adding and how. Show us the snippet related. Sounds like you are doing it in a wrong way.
Ajayreddy2611 at 16-May-12 4:35am
   
in that column i am saving datetime but its not saving
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The name timestamp is deprecated, the new (and more accurate) name is rowversion.
 
SQL Server columns of type rowversion are always generated and set by the database server.
 
If you use a different datatype in the target table. The values read from a rowversion column can be stored in a varbinary column. So you could create a varbinary column in the new table to hold the values from the old table. Of course, going forward this varbinary column would not get updated automatically like a rowversion column would.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 535
1 CPallini 450
2 OriginalGriff 270
3 George Jonsson 256
4 Suvabrata Roy 229
0 OriginalGriff 4,873
1 CPallini 3,900
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,646
4 Gihan Liyanage 2,236


Advertise | Privacy | Mobile
Web01 | 2.8.140905.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100