Bulk Insert Into Table that Requires an Auto Generated ID from another Table
Posted on 2007-08-07
I'm trying to avoid using a cursor. I have a flat table that is populated by a CSV file that the user uploads. I need to move the data from this table into two other tables. Once table is called individuals, the other is called individualphonenumbers. IndividualPhoneNumbers has a column for the IndividualID that is generated in the Individuals Table when a record is inserted. Is there anyway to do my insert(s) using a bulk insert statement or am I going to be forced to cursor through each record.