Re: DBI Issue with MySQL query
- From: GalbreathM@xxxxxxx (Mark Galbreath)
- Date: Wed, 10 May 2006 09:26:52 -0400
Of course it's a string. It was a typo.
my $rows = $dbh->do("LOAD DATA INFILE 'data.txt' INTO TABLE 'db.table' FIELDS
TERMINATED BY '|'");
'db.table' == "database_name.table_name"
Paul DuBois <paul@xxxxxxxxx> 10-May-06 09:13:47 AM >>>
On 5/10/06 7:58, "Mark Galbreath" <GalbreathM@xxxxxxx> wrote:
Hi guys,
The following query works fine from the MySQL client:
LOAD DATA INFILE 'data.txt' INTO TABLE 'db.table' FIELDS TERMINATED BY '|'
but fails in perl with a malformed SQL syntax error:
my $rows = $dbh->do(LOAD DATA INFILE 'data.txt' INTO TABLE 'db.table' FIELDS
TERMINATED BY '|');
Anybody have a clue as to why this will not work?
That hasn't the faintest hope of working. You should post the actual code
that you're using. do() with a non-string argument is surely not your
actual code.
Also, 'db.table' doesn't look like a valid quoted identifier.
- Follow-Ups:
- Re: DBI Issue with MySQL query
- From: Tim Bunce
- Re: DBI Issue with MySQL query
- Prev by Date: Re: DBI Issue with MySQL query
- Next by Date: RE: :XBase, STDOUT, and IO issue
- Previous by thread: Re: DBI Issue with MySQL query
- Next by thread: Re: DBI Issue with MySQL query
- Index(es):
Relevant Pages
|
|