RE: Returned value from insert

2002-02-13 Thread Legdon, Simon
you're using should not affect this, AFAIK, but I'm pretty sure that Oracle didn't add the RETURNING clause to INSERT and UPDATE until one of the Oracle 8 variants. Simon > -- > From: Michael A Chase > Sent: Wednesday, February 13, 2002 8:02 AM

Re: Returned value from insert

2002-02-12 Thread Michael A Chase
om: "Stacy Mader" <[EMAIL PROTECTED]> To: "Brett W. McCoy" <[EMAIL PROTECTED]> Cc: "DBI Users" <[EMAIL PROTECTED]> Sent: Tuesday, February 12, 2002 22:39 Subject: Re: Returned value from insert > Brett, > > Your right. From the DBD::Oracle (

Re: Returned value from insert

2002-02-12 Thread Stacy Mader
Brett, Your right. From the DBD::Oracle (v1.12) doco - INSERT INTO table (k, v) VALUES (seq_name.nextval, ?) To get the value just inserted you can use SELECT seq_name.currval FROM DUAL This was from the DBD::Oracle v1.12 doco. I currently have v1.06! Regards, Stacy. "Brett

Re: Returned value from insert

2002-02-12 Thread Brett W. McCoy
On Wed, 13 Feb 2002, Stacy Mader wrote: > #!/usr/local/bin/perl > > use strict; > > my $sql = q{ > INSERT INTO REPORT > VALUES (REPORT_NUM_SEQ.NEXTVAL,?,to_date(?,'DD-MON- HH24:MI') > ), > undef, $report, $date_reported > }; > > Where the report number is incremented