Sorry - of course, you are right. Red Hat Linux Workstation 4.0 on Intel Pentium 4 Perl 5.8.5 DBI 1.50 (Dec 2005) DBD::mysql 3.0003 Previous version DBD::mysql 2.9008 (Jun 2005)
>>> Paul DuBois <[EMAIL PROTECTED]> 11-May-06 10:22:10 AM >>> Ah. I believe this is the first time you've mentioned that it might have something to do with the version of DBD::mysql. What's the last version you used for which it worked, and the version that you're using now? That's pertinent information; omitting it makes it more difficult for people to help you. On 5/11/06 9:12, "Mark Galbreath" <[EMAIL PROTECTED]> wrote: > Yes. And this code works with previous versions of DBD::mysql. > > >>>> Paul DuBois <[EMAIL PROTECTED]> 11-May-06 09:31:06 AM >>> > None of those quoting options are valid for quoting _identifiers_. > Did you try using backticks? > > http://dev.mysql.com/doc/refman/5.0/en/legal-names.html > > > On 5/11/06 8:02, "Mark Galbreath" <[EMAIL PROTECTED]> wrote: > >> Tim, >> >> I've tried every imaginable option: single quotes, double quotes, escaped >> quotes, table name only, no quotes....nothing works. I think there is a bug >> in DBD::mysql(3). I have spent hours and hours googling this problem and no >> one else has reported it. >> >> ~mark >> >>>>> Tim Bunce <[EMAIL PROTECTED]> 11-May-06 08:40:24 AM >>> >> >> On Wed, May 10, 2006 at 09:26:52AM -0400, Mark Galbreath wrote: >>> 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" >> >> Don't put single quotes around the table name. >> >> db.table >> or `db`.`table` >> >> should work, but 'db.table' won't. >> >> Tim. >> >>>>>> Paul DuBois <[EMAIL PROTECTED]> 10-May-06 09:13:47 AM >>> >>> >>> On 5/10/06 7:58, "Mark Galbreath" <[EMAIL PROTECTED]> 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. >>> >>> >>> >>> >> >> > > >