Perl query error - Mailing list pgsql-novice

From Patrick Hatcher
Subject Perl query error
Date
Msg-id OF4934A5A6.09B8BDA3-ON88256B97.005B9AD8@fds.com
Whole thread Raw
Responses Re: Perl query error
List pgsql-novice
Hello,
I'm trying to use a Perl script to export a query result to a text file.
The result should have no header or footer information.  However, when I
run the script, I get a message: DBD::Pg::st execute failed: ERROR:
parser: parse error at or near "/" at ./mdcupc.pl line 189.

Here's the section where the error occurs:


     # Send command to not print header or footer information
     my $query = $dbh->prepare("\t")
          or die "Cannot prepare SQL statement: $DBI::errstr\n";
          $query->execute ;


     # Send command to not print header or footer information
       $query = $dbh->prepare("select * from upc_export_v  \g
/home/ftp/pub/Incoming/postgres/ozupc.txt;")
          or die "Cannot prepare SQL statement: $DBI::errstr\n";
          $query->execute ;

Any help would be greatly appreciated.

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-932-0610 office





pgsql-novice by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Question on oid's
Next
From: "Joshua b. Jore"
Date:
Subject: Re: Perl query error