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)
 Import into SQL Server from MS_Excel

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-12-12 : 08:34:10
Jill writes "I want to import data from MS_Excel into a SQL Server database. I know how this is done, but how do I determine the next primary key value that is system generated. This primary key value is not sequential - it is random number and letter combination. How do I inserted the correct value for the primary key when I do the import?"

dsdeming

479 Posts

Posted - 2003-12-16 : 08:30:37
Do you have a udf in the database that builds the PK? If so, you could bcp the data into a temp table and do the inserts from there using an inline udf call.



Dennis
Go to Top of Page
   

- Advertisement -