April 14, 2010 at 5:25 pm
I have an OLE Destination in my data flow with an identity column. What I need to do is insert a row in another table after each row is inserted into my OLE Destination successfully. This second table acts as an audit and will need the identity value of the row just inserted plus variable values from the data flow (These variable values are not in the inserted row...therefore an insert trigger is not sufficient)
Any suggestions?
April 14, 2010 at 5:37 pm
Have you reviewed:
@@IDENTITY, SCOPE_IDENTITY, and IDENT_CURRENT are similar functions because they all return the last value inserted into the IDENTITY column of a table.
@@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session. However, SCOPE_IDENTITY returns the value only within the current scope; @@IDENTITY is not limited to a specific scope.
IDENT_CURRENT is not limited by scope and session; it is limited to a specified table. IDENT_CURRENT returns the identity value generated for a specific table in any session and any scope. For more information, see IDENT_CURRENT (Transact-SQL
To determine if one of these values can be what you need?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply