Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to insert a data of datetype timestamp into Sqlserver2000

 
Welsh Ding
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In sqlserver2000,a table have a column is datatype timestamp,I used these mothed to insert a record:
1.insert tableName values (CURRENT_TIMESTAMP);
error:
Disallowed implicit conversion from data type datetime to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query.

2.insert tableName values ('1998-12-31 12:30:00');
error:
Disallowed implicit conversion from data type varchar to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query.
3.insert tableName values (GETDATE());
error:
Disallowed implicit conversion from data type datetime to data type timestamp, table 'eServices.dbo.SMS_COMMENTARIES_USER_LOGS', column 'UPDATE_DATE'. Use the CONVERT function to run this query.
How to insert a data of datetype timestamp into Sqlserver2000? thanks in advance!
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi:
I am not sure of the answer, but you might want to try this:
use java.sql.Date instead if java.util.Date
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic