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
 SQL Server Development (2000)
 bulk upload identity

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-10-11 : 05:44:50
how can i make bulk upload to a table with identity column
withought going through a TempTable first.


thnaks i nadvance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-11 : 05:53:14
Do you want SQL Server to assign identity values automatically or do you want to load them from file?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-10-11 : 06:04:53
i want SQL Server to assign identity values automatically .
i forgot to mantain that i do this upload using a fromat file

thanks
Peleg


Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-11 : 06:12:21
How you are uploading the data? using BCP or Bulk Insert?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-10-11 : 06:13:24
bcp

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-10-11 : 06:29:56
Are you specifying -E option with BCP?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-11 : 06:58:47
"Are you specifying -E option with BCP?"

That's if the IDs are already in the file and you want SET IDENTITY_INSERT ON - isn't it?

"i want SQL Server to assign identity values automatically"

Surely it will do this anyway - if you don;t provide a value for the ID column?

Or I'm being more thick than normal this morning!

Kristen
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-10-11 : 07:08:57
it wors
i work with format files so no need to add a column for the identity thanks
all
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page
   

- Advertisement -