Posted by manstein on 11/27/05 07:36
Hey BigJ
If you know the table name then you can retreive the last identity
value with the function: IDENT_CURRENT('<table name>'). This works
accross all sessions and scopes. The problem with @@IDENTITY var is
that it is global only to the session where the insert occured. This
may not be the same session where you are quering the @@IDENTITY. If
this doesnt work for you, please post more info about how the details
are inserted into SQL server. thanks
best regards.
Navigation:
[Reply to this message]
|