#####################################################################
my $query = $conn->prepare_cached(q{SELECT DISTINCT ID, NAME from CUSTOMERS where ID=?});
$query->execute($account);
#####################################################################
The above code (one ID at a time) works fine.
I would like to do this instead:
#####################################################################
my $query = $conn->prepare_cached(q{SELECT DISTINCT ID, NAME from CUSTOMERS where ID in (?)});
$account_list = "701,705,751,754,749,755,756,757,758,780"; $query->execute($account_list); #####################################################################
When I try to do this, I get this error:
*************************************************************************
DBD::Oracle::st execute failed: ORA-01722: invalid number (DBD ERROR: OCIStmtExecute) at CustomerSupport.pm line 229.
CustomerSupport::getCustomersTEST('CustmerSupport=HASH(0x82fec14)', '701,705,751,754,749,755,756,757,758,7...') called at /path/customers/test.cgi line 136
DBD::Oracle::st execute failed: ORA-01722: invalid number (DBD ERROR: OCIStmtExecute) at CustomerSupport.pm line 229.
*************************************************************************
The same query executes fine from the command line in SQLPlus, when I expand the account string into it, so I think there is something going on in the Perl part.
Is there a way to use prepare_cached in this way?
Do I need to format the $account_list string in a different way to make this work?
Any help appreciated.
-- Barbara E. Lindsey, COG RDC Phone: (352) 392-5198 ext. 314 Fax: (352) 392-8162
----
CONFIDENTIALITY NOTICE: The information contained in this electronic message is legally privileged and confidential and intended only for the use of the individual(s) or entity(ies) named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this email or any of it's components is strictly prohibited. If you have received this email in error, please contact the sender.
----
