I'd like to be able to insert a row and get the Identity column from it. I would normally tack on the ;Select @@Identity and get the row from that.
Is this possible from using any of the Existing components besides the script component and making a connection to the DB myself
Thanks,
Scott<-

Using OLE DB Command w/ Insert and want to return 'Select @@Identity'
mandoman2
Scott,
I did this basically the same way you did but used an 'Execute SQL Task' component. I executed two SQL statements, the second of which was a Select @@Identity. I configured the result set to be 'Single Row' and mapped the result to a variable. Note: I had to cast @@Identity to an integer in the SQL to match my variable declaration of Int32.
Dan
nron
Thank you for your reply.
The 'Execute SQL Task' is a Control Flow Item Correct I need it in the DataFlow.
I have a Script Component that has 2 Outputs, The Rows that it processed, and the rows the script had issues with.
For the ones it has an issue with I insert a record into our Internal Support DB with all the info and the Row ID.
Normally when we insert a Row into the Support DB, we get back the Identity of the row jsut inserted and send out an email with the info for the Support engineer to look at that entry in the Support DB.
I'm new to SSIS, so I dont know if there is a way I can pass back out of the DataFlow the Rows from the output of a script.
Thanks,
Scott<-