Re: PERL DBI ORACLE DATABASE OUTPUT TO A FILE

[email protected] (Bruce Johnson)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
On May 11, 2010, at 12:25 PM, tech422 wrote:

> Hi,
> 
> I am trying to query an Oracle database and output the results to a
> file using PERL but its not working. I have tried 2 approaches. 1 uses
> bind the other does not. Could you please advise?

This is my usual route:

while (($col1,$col2,$cms_gateway_name,$cms_gateway_ip_address,
$cms_subnet_mask,$cms_subnet_notation,$cms_subnet_name,$cms_vlan_no) = $sth->fetchrow()){...}

I know that works, I do it all the time.

Silly question, have you tested the query in SQLPlus or some other tool to confirm that you're getting any rows?

-- 
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.