openXML with Identity insert
Posted on 2005-04-19
I have problem with openXML, when I am trying to insert records in table which has identity column as primary key. I tried to use SCOPE_IDENTITY but that did not work. The scenarion is as follows.
Table A (A_ID int IDENTITY, Bal float, SecID varchar(36))
Table B(A_ID, Pct float)
I have multiple records to be inserted oin Table A reading from an XML file. Also the IDS in Table A act as foreign key in Table B so multiple records need to be inserted in table B based on IDs inTable A.
How can I do this when I am using openXML?