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
 Transact-SQL (2000)
 BulkInserting

Author  Topic 

Sirchrisak
Starting Member

19 Posts

Posted - 2005-06-23 : 08:19:53
Hi I have a table with AutID, I want to BulkInsert into this Table.I am finding it difficult.how can I bulkInsert into Table with AutoID?
PLZ help

Chris

ajthepoolman
Constraint Violating Yak Guru

384 Posts

Posted - 2005-06-23 : 09:07:29
Are you needing to overwrite the AutoID?

Aj
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-23 : 09:08:38
What kind of difficult do you have?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Sirchrisak
Starting Member

19 Posts

Posted - 2005-06-23 : 10:58:15
No It I dont want to ovewrite the AutoID but I want as it inserts into a new row, AutoID will be generated as Usual.When i want to Bulk Insert into ,it Error but if try to insert into table without AutoId it will Insert Well

Chris
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-06-23 : 12:57:33
Insert into the column names you want omitting the autoID column. It would generate it, by itself

Afrika
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-06-23 : 14:52:28
If the AutoId column is not present in the file, You need to use a format file.
See the KEEPIDENTITY option, of the BULK INSERT command (BOL).

You could also bulk insert into a staging table,
and then do a regular insert from the staging table to the target table.


rockmoose
Go to Top of Page
   

- Advertisement -