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: Simple Query to Oracle db

Re: Simple Query to Oracle db

From: Peter J. Schoenster <webmaster_at_rede.com>
Date: Thu, 10 Aug 2000 17:39:33 -0600
Message-Id: <10585.114320@fatcity.com>


On 10 Aug 2000, at 17:55, Eric Miles wrote:

> I'm trying to execute the following SQL statement:
>
> select count(*) from table where field = ?
>
> within a perl script using DBI and DBD::Oracle.
>
> How can I get the result into a variable? I know this sounds
> absurdly simple,
>
> but for the life of me, I can't get it working.
>
> I've tried bind_param_inout, the 'do' statement. All with errors
> or wrong values
>
> such as '0E0'.

As someone said, the docs are good, there are examples in the DBD::Oracle distribution ... but you also may want to run the same query in sqlplus to be sure there is data to return. I usually print out my sql statements when developing just for this reason ... and when I don't get what I expect I run it in the rdbms client. Try that. then show the code you are using that doesn't work if you get the desired result in the client.

Peter



Exercise Your Brain, Read a Book
-- O Crazy Gringo, Ipanema, Brazil Received on Thu Aug 10 2000 - 18:39:33 CDT

Original text of this message

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