Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 TIMESTAMP INSERT

Author  Topic 

amrit09
Starting Member

3 Posts

Posted - 2007-09-04 : 06:57:51
Hello all. This is my first time on this forum.

I have a problem that i wonder if anyone can help me with.

I received data from a colleague in a CSV file format. This file contained a timestamp column. I had to change this into a .txt file and tried to export the data into a database. However, the timestamps didnt get inserted. Is there anyway i can do this as i need the timestamp values for my queries?

thanks

jaypee_s
Starting Member

22 Posts

Posted - 2007-09-04 : 07:06:03
Hi

Copy the timestamp value from .csv to text file ,

create new excel file,change the format to text, copy all the values from .csv file to excel file except time stamp, copy timestamp value from text file and save the excel file and export.

Regards
jp
Go to Top of Page

amrit09
Starting Member

3 Posts

Posted - 2007-09-04 : 07:08:38
hi jaypee

it is the insert into a timestamp field in the sql db that is the problem, as it doesn't allow timestamp field to be updated. But i need the original timestamps that go with the data.
Go to Top of Page

sbalaji
Starting Member

48 Posts

Posted - 2007-09-04 : 07:46:43
U cannot insert into timestamp column.
Timestamp is guaranteed to be unique in the database.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-04 : 08:10:14
If you want the data you will need to use a different datatype for that column, e.g. VARBINARY.

Note that if the record is updated thereafter that value will NOT be automatically changed, as it will be on the original TIMESTAMP column

Kristen
Go to Top of Page

amrit09
Starting Member

3 Posts

Posted - 2007-09-04 : 08:17:14
ok, thanks all for your help.
Go to Top of Page
   

- Advertisement -