I need to to do a insert from a table with the following structure:
Table A
Col1 Col2 Col3 Col4
intID1 intID2 intID3 intID4
I need to select the rows from the above table that are null for col1,col2,col3 and insert those rows into a table that will generate an identity row that I need to use to insert into another table.I am not sure of the sql statement or the general method used to select those rows and insert them multiple times and retrieve the identity id one by one to insert into the next table. Any help is greatly appreciated!
Sample process:
Table A
Col1 Col2 Col3 Col4
1 3 7 null
null null null 45
null null null 67
1)Retrieve rows 2 and 3
2)Insert 2 and 3 into another table to retrieve identity id for both rows
3)Insert identities from step 2 into another table