Viewing 4 posts - 1 through 4 (of 4 total)
I figured it out. @@IDENTITY will not work. This is what I needed to do:
SET @ID = IDENT_CURRENT('Table1 ')
June 16, 2009 at 3:52 pm
#1010524
The assignment is after the first insert, but the OUTPUT clause runs after the INSERT statement and overrides the @@IDENTITY value.
June 16, 2009 at 2:24 pm
#1010492
Perfect! Thanks so much.
April 15, 2009 at 11:49 am
#978289
This solution worked perfectly. Thanks so much!
March 11, 2009 at 7:51 am
#957481