October 13, 2016 at 11:34 am
I want to get the latest inserted record from target table and update the field in source table.
Source:
Name company targetID
Jane YYYY Null
Basically, I am looping the files in SSIS and inserting the target tables via webservice(script task). Each record is created per file . I want to capture the latest ID created in target and update the source field.
Target:
ID name company
1 Jane YYYY
after the row is created in target for a file, I want my source to be Source:
Name company targetID
Jane YYYY 1
If the row is not created ,then do not update source.
I checked for scope_identity(),ident_current but not sure how to use them in my situation as I am inserting target tables via webservice.
Also, my target table can have more than 1 identity column. How do I use Ident_Column on this table?
Any help is appreciated.
October 13, 2016 at 12:11 pm
Also, my target table can have more than 1 identity column. How do I use Ident_Column on this table?
Can you post the DDL for this table? I don't have a copy of SQL 2005 anymore but I am not sure that version allowed multiple identity columns on a table. Not sure any version allowed it so curious as to how you accomplished this.
Sue
October 13, 2016 at 1:50 pm
Pretty sure that you can only have one column in a table identified as an identity column.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy