Re: How can I get insert_id from DBD::Oracle?

2001-06-20 Thread Tim Bunce
But for minimal app code change I'd suggest a using a PL/SQL trigger that implements the auto increment functionality and saves the last value into a per-session package variable. If you, or anyone, does the latter then I'd be very interested in having a copy as I'll need to do

RE: How can I get insert_id from DBD::Oracle?

2001-06-14 Thread Rich Buckley
All, Using a sequence and trigger as discussed will allow the following to work : INSERT INTOtab (value) VALUES ('foo'); SELECT MAX(id) FROM tab; as long as these two statements are within the same transaction block. I do however like the Oracle 8 returning clause a

RE: How can I get insert_id from DBD::Oracle?

2001-06-11 Thread Steven Baldwin
I apologize if it doesn't mean much to you. Hope this helps, Steve -Original Message- From: Jim Spath [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 5:22 AM To: Gregory; [EMAIL PROTECTED] Subject: Re: How can I get insert_id from DBD::Oracle? There is no DBD::Oracle

How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Gregory
I'm migrating from MySQL to Oracle. When I'm executing INSERT... with DBD::mysql I could get the id of inserted row with DBH-{mysql_insertid}. Is there any way to do the same thing with Oracle (DBD::Oracle)? Thanks. Grisha.

RE: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Kokarski, Anton
PROTECTED] Subject: How can I get insert_id from DBD::Oracle? I'm migrating from MySQL to Oracle. When I'm executing INSERT... with DBD::mysql I could get the id of inserted row with DBH-{mysql_insertid}. Is there any way to do the same thing with Oracle (DBD::Oracle)? Thanks. Grisha.

RE: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Sterin, Ilya
Yes there is one, as a matter effect mysql prides itself on that one. Ilya Sterin -Original Message- From: Kokarski, Anton To: 'Gregory'; [EMAIL PROTECTED] Sent: 6/8/01 1:24 PM Subject: RE: How can I get insert_id from DBD::Oracle? Greg, Look around on mysql.com I've seen

Re: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Tim Bunce
On Fri, Jun 08, 2001 at 12:24:33PM -0700, Kokarski, Anton wrote: Greg, Look around on mysql.com I've seen a mentioning of the utility that allows you to port MySQL to oracle. I think it comes from Oracle. And is a mostly hopeless marketing tick box gimmick. I'm migrating from MySQL to

Re: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Rob Fugina
On Fri, Jun 08, 2001 at 11:23:07PM +0100, Tim Bunce wrote: For maximum perfomance I'd suggest selecting from an Oracle 'sequence' before you do the insert. Done that plenty of times... But for minimal app code change I'd suggest a using a PL/SQL trigger that implements the auto increment