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,$c
I like using Text::CSV_XS for this sort of thing. If your columns in your
select are ordered properly you could try the following.
use Text::CSV_XS;
use IO::File;
my $csv = Text::CSV_XS->new({binary=>1, eol=>$/, always_quote=>1});
my $fh = IO::File->new(">somefile.csv");
if(defined $fh){
m
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?:
Using Bind:
sub get_cms {
$ENV{ORACLE_HOME} = "/usr/local/oracle/OraHome1";
my $unique = 0;
open