there is no function, just use the system variable @@identity to get the
last id,
i.e.  select @last_inserted_id = @@identity
this var will be updated for each insert

-----Original Message-----
From: cpryce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 3:05 PM
To: dbi users perl.org
Subject: OT: Transact-sql problem


I apologize for the Off-topic Question.

I have an application that was built in Perl for MySQL. I want to port the
application to an MS SQL server, but there doesn't seem to be an equivalent
to the LAST_INSERT_ID function.

Is there a Transact equivalent, or does any one have experience coding a
work-around? 

Thanks, 
cp
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message that arise as a result of e-mail transmission.
This message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments. 
 All e-mails at Neuberger Berman are, in accordance with Firm policy, to be
used for Neuberger Berman business purposes only. E-mails sent from or to
the Firm are subject to being reviewed by the Firm in accordance with the
Firm's procedure for the review of correspondence.

Reply via email to