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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Auto Increment & Timestamp error when importing...

Author  Topic 

R2D2RABEAU
Starting Member

13 Posts

Posted - 2006-11-20 : 05:02:09
Hi,

I am trying to import data (excel) into SQL (2000)but I am having trouble with the extra columns (Identity-autoincrement and Timestamp or datetime)I created in SQL server: The server asks me to provide the data for both the ID and the date?????!
I would rather prefer SQL to auto-increment and provide the date when I bulk import data, how can I do that??

Thank you for your help.

P.O.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-20 : 06:07:35
Do you have some samples of the identity/autoincrement column and timestamp/datetime column?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

R2D2RABEAU
Starting Member

13 Posts

Posted - 2006-11-20 : 06:25:22
quote:
Originally posted by Peso

Do you have some samples of the identity/autoincrement column and timestamp/datetime column?


Peter Larsson
Helsingborg, Sweden



I haven't: I want SQL Server 2000 to generate them for me when data is imported into the SQL table...

P.O.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-20 : 06:46:23
Use GETDATE() for Timestamp function.
For IDENTITY, preset the table to include this value, or use IDENTITY() in the INSERT statement. I prefer having IDENTITY on the target column.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

R2D2RABEAU
Starting Member

13 Posts

Posted - 2006-11-20 : 07:24:59
Thank you very much!


P.O.
Go to Top of Page
   

- Advertisement -