RE: Query with return value

2001-07-30 Thread cshelton
stgreSQL (opensource) > > Eric > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 30, 2001 2:21 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Query with return value > > > Eric,

RE: Query with return value

2001-07-30 Thread Kokarski, Anton
PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query with return value Eric, PL/SQL (Procedural Language SQL) is an Oracle product. It allows you to make a script that combines a lot of rudimentary procedural language stuff with sql statements. So you can create variables, arrays

RE: Query with return value

2001-07-30 Thread Eric, Audet
Oh ... my database is PostgreSQL (opensource) Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 2:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query with return value Eric, PL/SQL (Procedural

RE: Query with return value

2001-07-30 Thread timothy . helck
Audet [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 1:31 PM To: '[EMAIL PROTECTED]'; Eric, Audet; [EMAIL PROTECTED] Subject: RE: Query with return value Oh ... no, I am not familiar with this style ... Where can I find some documents with examples on this? Eric -Origi

RE: Query with return value

2001-07-30 Thread Eric, Audet
Oh ... no, I am not familiar with this style ... Where can I find some documents with examples on this? Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 1:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query with return

RE: Query with return value

2001-07-30 Thread timothy . helck
Eric, Do you realize that you can put all sorts of pl/sql stuff into a DBI cursor? You could do both of your inserts within one cursor, greatly simplifying things. Try something like this: my $insertCursor = q { DECLARE custId number(8); BEGIN SELECT cust

RE: Query with return value

2001-07-30 Thread Marcotullio, Angelo
How about currval? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 1:03 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query with return value This is really an oracle specific question I think: In a before insert trigger

RE: Query with return value

2001-07-30 Thread LBaxter
This is really an oracle specific question I think: In a before insert trigger on your table add the following: select customer_custid_seq.nextval into :new.custid from dual; You can also do the equivalent in DBI... but I prefer a trigger for this kind of thing. Lincoln -Original Message-

RE: Query with return value

2001-07-30 Thread Sterin, Ilya
If I were you I would not define custid as a function default, but rather call it separatelly, therefore you can run a select on dual first, retrieve the value and then proceed with transaction. You can then roll or commit the rest of the queries, other than nextval, since that can't be rolled ba