I have a table "a" with a list of files names of data that I want to bulk insert into table "b". My question is what is the simplest way to do this.
Sample data in table a
path(column name),flag(column name)
c:\work\data1.txt,false
c:\work\data2.txt,false
Now I want to iterate through table "a" and use the bulk insert command using the "path" column to bulk insert the data into table "b". I also want to change the "false" flag to "true" to denote that the file has already been imported. I seem to be having a problem with the looping through the table to get the next row to do the bulk insert.
Sample data in table a
path(column name),flag(column name)
c:\work\data1.txt,false
c:\work\data2.txt,false
Now I want to iterate through table "a" and use the bulk insert command using the "path" column to bulk insert the data into table "b". I also want to change the "false" flag to "true" to denote that the file has already been imported. I seem to be having a problem with the looping through the table to get the next row to do the bulk insert.