Hi Folks
I can't get last_insert_id() to work with Oracle.
OS: GNU/Linux
DBI: V 1.48
Oracle: 9.2.0
Demo (to save you typing): http://savage.net.au/last.pl
I've tried various values for catalog and schema, including the schema for the
(test) table.
Any idea?
--
Cheers
Ron Savage, [EMAIL
On Thu, 6 Oct 2005 14:00:58 +0100, Gaul, Ken wrote:
Hi Ken
Thanx. I'll try that tomorrow, at work.
It's 11pm here now.
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 6/10/2005
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company
-Original Message-
From: Ron Savage [mailto:[EMAIL PROTECTED]
Sent: 06 October 2005 11:30
To: List - DBI users
Subject: Oracle and dbh - last_insert_id
Hi Folks
I can't get last_insert_id() to work with Oracle.
OS: GNU/Linux
DBI: V 1.48
Oracle: 9.2.0
Demo (to save you typing):
Another alternative is to submit 2 queries - the first would be to retrieve
the sequence nextval:
SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
and the next would be the INSERT where you actually provide the
value you just SELECT'ed. It does involve an initial SELECT query to
Hi.
We have some Perl DBI scripts and have been running them on a Perl compiled
with threading disabled. (I.e. perl -V gives ...usethreads=undef...). I
also have another environment where Perl is compiled with usethreads=define
and have found the threading capabilities useful. (This is the
From: Hardy Merrill [EMAIL PROTECTED]
Date: 2005/10/06 Thu AM 08:43:09 CDT
SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
Playing devils' advocate, in a busy environment there's no guarantee that
the result of that query is the value that will be used for the subsequent
amonotod [mailto:[EMAIL PROTECTED] wrote:
SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
Playing devils' advocate, in a busy environment there's no guarantee that
the result of that query is the value that will be used for the subsequent
insert. The query with the
On Thu, 6 Oct 2005 15:22:24 +0100, Tim Bunce wrote:
Hi Tim, and others
Firstly, thanx for the responses.
That's because it's not implemented. Patches welcome - but I
suspect it's non-trivial.
I assume the problem is determining (ie asking Oracle to determine) the
relationship between the
On Thu, 06 Oct 2005 09:43:09 -0400, Hardy Merrill wrote:
Hi Hardy
SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
Sure, but when you are calling Class::DBI's 'create' you are another step
removed from the insert statement itself.
So what to Class::DBI users do in such a case?
--
On Thu, 06 Oct 2005 09:43:09 -0400, Hardy Merrill wrote:
Hi Hardy
SELECT [sequence name].NEXTVAL as my_seq_nextval FROM dual
Also, is this really any different from calling seq.currval after the insert? I
assume not.
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 7/10/2005
Ron,
(Apologies for top-posting ...)
In most cases there will be no difference, but it is possible for
triggerbased logic to subsequently bump the value of a sequence. This
means fetching seq.currval after the insert could give you a value higher
than the one actually used in the insert.
What
On Fri, 7 Oct 2005 08:24:22 +1000, Steve Baldwin wrote:
Hi Steve
(Apologies for top-posting ...)
No problem. It's the norm in the mod_perl list, but still distresses some
people.
In most cases there will be no difference, but it is possible for
triggerbased logic to subsequently bump the
Hi Ron,
See below ...
-Original Message-
From: Ron Savage [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 October 2005 9:09 AM
To: List - DBI users
Subject: RE: Oracle and dbh - last_insert_id
On Fri, 7 Oct 2005 08:24:22 +1000, Steve Baldwin wrote:
Hi Steve
(Apologies for top-posting ...)
Hi EveryOne,
I have a query related to Oraperl.
Actually , I have a script which is creating a connection to an Oracle
database.
The connection code is :
ora_login('','/','');
What I know is that for system_id , it is taking the value of
ORACLE_SID
But I not getting what it is taking
14 matches
Mail list logo