Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: OT: perl DBI/DBD: can I pass in an array as parameter?

Re: OT: perl DBI/DBD: can I pass in an array as parameter?

From: Tim Bunce <Tim.Bunce_at_pobox.com>
Date: Tue, 01 Jul 2003 15:03:24 -0700
Message-ID: <F001.005BDA58.20030701144954@fatcity.com>


Not yet. It is being worked on though:
http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=7sfzlwita2.fsf%40ash.int.sifira.dk&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26group%3Dperl.dbi.dev http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=20030616160334.GA9324%40dansat.data-plan.com&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26group%3Dperl.dbi.dev

Tim.

On Tue, Jul 01, 2003 at 08:19:49AM -0800, Guang Mei wrote:
> Hi:
>
> Does anyone know if I can pass an array in perl to an sql using DBI/DBD so
> that I get result set from Oracle?
>
> Specifically, I want do something like in perl:
>
>
> $sth = $dbh->prepare (" select tab1.col1, tab2.col2 from tab1, tab2
> where tab1.ID1 = tab2.ID2
> and tab1.X = ? ");
>
> my @my_array;
>
> # filling in my_array with data here
>
> $sth->execute(@my_array);
>
> my ($col1, $col2);
> while(($col1, $col2) = $sth->fetchrow_array()) {
>
> # do processing of $col1 and $col2;
> }
>
> I am hoping to save repeated sql calls, do only one call and get all the
> rows back.
>
> Is it possible in any version DBI/DBD? I looked at
>
> http://perldoc.com/perl5.6.1/lib/DBI.html
>
> and I does not seem to be able to figure it out. If it is possible, any
> simple example code somewhere?
>
> Thanks.
>
> Guang
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Guang Mei
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Bunce
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jul 01 2003 - 17:03:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US