title: User Defined Table and Variable
body: <p>I have a stored procedure that inserts multiple rows into a table via a USER defined tyble.  The user defined type is populated from a c# datatable.</p>
  
  <p>Within the stored procedure, before the insert command with the datatable executes, I have another insert command into another table. Scope_Identity() to grab the ID of the newly inserted row and assign it to a variable.</p>
  
  <p>What I would like to do is add that ID to all the rows that are added with the User defined type.</p>
  
  <p>What's the best way to do this?  How can I incorporate the Scope_Identity value into the insert statement?</p>