Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jac2375
Starting Member
1 Post |
Posted - 2012-01-16 : 02:57:35
|
I am using SQL Server 2008 to create a procedure.I am using the following sql statement to insert into a audit table insert into Listuser ( UserID, ListID, AuditCreated ) select UserID, ListID, GETDATE() from ListUser where Surname='surname'I am using scope_identity() to get the identity column from the listuser table and insert the identity column to another logs tableIf the select statement contains more than 1 value, how to get the identity value of both columns and insert into logs table? quote:
|
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|