RE: Import Batch syntax error

2003-03-21 Thread Tab Alleman
Gerald R. Jensen wrote:
> I just ran your query (create and both inserts), and it
> worked like a charm on a Win32 MySQL 3.23.52.
> 
> Just out of curiousity, why are putting the \r in?
> 

Gerald (and all who were interested),

I didn't put the \r in, actually...mysqldump did.  The solution to the
puzzle was that I was looking at the wrong line.  The reason I was
looking at the wrong line was that mysqldump puts funky New Line
characters into its output that Edit Plus (the text editor I use when I
need line-numbering) doesn't recognize.  For instance, this output:

> CREATE TABLE `tmphotelinfo` (
>   `OrgID` varchar(9) default NULL,
>   `MetroCode` char(3) default NULL,
>   `Name` varchar(100) default NULL,
>   `Address1` varchar(100) default NULL,
>   `Address2` varchar(100) default NULL,
>   `City` varchar(50) default NULL,
>   `State` varchar(10) default NULL,
>   `Zip` varchar(16) default NULL,
>   `Country` varchar(50) default NULL,
>   `Phone` varchar(24) default NULL,
>   `Fax` varchar(24) default NULL,
>   `CCs` varchar(32) default NULL,
>   KEY `OrgID` (`OrgID`)
> ) TYPE=MyISAM;

Was all on one line in Edit Plus.  So I replaced all the funky
characters with nothing (""), ran the batch file again, and this time I
found the Real line that had the problem which was yet another funky
character that had no business being there, so I deleted that, ran the
file again, and it gave me no further trouble.

Hopefully the lesson I learned will help somebody else someday
somewhere.  Thanks to all who contributed!

Tab

Mysql query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re[6]: Import Batch syntax error

2003-03-21 Thread Stefan Hinz
Tab,

>> file). Anyway, it can't help to try the following:
>> C:\mysql\bin>>mysql --max-allowed-packet=32M < \dev_hotel_data.sql

> Thanks, I'll try that... But in the meantime, is there something I can
> do to get Mysql to show me more information about the syntax error?  I
> think that the difference in the parser might be causing my line-numbers
> to be off.  I went into my text editor and replaced the line that had
> the "error" with a blank line, and when I ran it again it still reported
> the same error on the same line #...So I'm wondering if there's a better
> way to get Mysql to give me more clues as to which line is causing the
> error.

Nope. But, as I said, it doesn't look like it's a "real" syntax error.
Something (maybe due to the communications buffer size) sends only
part of that last INSERT command to MySQL, and that's what results in
an error.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Import Batch syntax error

2003-03-20 Thread Gerald R. Jensen
I just ran your query (create and both inserts), and it worked like a charm
on a Win32 MySQL 3.23.52.

Just out of curiousity, why are putting the \r in?

- Original Message -
From: "Tab Alleman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 20, 2003 10:51 AM
Subject: Import Batch syntax error


Still trying to get all the way through my import batch file.

Now I'm getting a syntax error on a certain line of the file, and a
subsequent run produced the same exact error on the same exact line, but
I can't see anything wrong with that line.

Here's the line that produces the error:

INSERT INTO `tmphotelinfo` VALUES("yvr100058","yvr","Holiday Inn
Metrotown","4405 Central Blvd.","","Burnaby","BC","V5H 4M3","","(604)
438-1881","(604) 438-1883","AE D MC V \r");

Here's the error:

ERROR 1064 at line 1036960: You have an error in your SQL syntax near
'"' at line 1

Here's the previous line, which apparently doesn't cause an error:

INSERT INTO `tmphotelinfo` VALUES("yvr100057","yvr","Holiday Inn Hotel &
Suites","1110 Howe Street","","Vancouver","BC","V6Z 1R2","","(604)
684-2151","(604) 684-4736","AE D MC V \r");

I see no appreciable difference between the lines.

Here's the line which creates the tmphotelinfo table:

CREATE TABLE `tmphotelinfo` (
  `OrgID` varchar(9) default NULL,
  `MetroCode` char(3) default NULL,
  `Name` varchar(100) default NULL,
  `Address1` varchar(100) default NULL,
  `Address2` varchar(100) default NULL,
  `City` varchar(50) default NULL,
  `State` varchar(10) default NULL,
  `Zip` varchar(16) default NULL,
  `Country` varchar(50) default NULL,
  `Phone` varchar(24) default NULL,
  `Fax` varchar(24) default NULL,
  `CCs` varchar(32) default NULL,
  KEY `OrgID` (`OrgID`)
) TYPE=MyISAM;

...and finally, there's nothing in the mysql.err file to give me a
further clue.  Does anybody here see something I don't?




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Re[4]: Import Batch syntax error

2003-03-20 Thread Andrew
I have been having a similar problem with a backup file from a phpBB forum
errors keeping showing a syntax error which from what you are all suggesting is
the size of the sql, is that correct?

Andrew

>-Original Message-
>From: Stefan Hinz [mailto:[EMAIL PROTECTED]
>Sent: 20 March 2003 19:30
>To: Tab Alleman
>Cc: [EMAIL PROTECTED]
>Subject: Re[4]: Import Batch syntax error
>
>
>Tab,
>
>>> Are you running this from a script? Maybe it's just a script
>>> timeout which would stop with the following line when it gets the
>>> timeout:
>
>> Oops, no sorry for all those who don't know where I left off yesterday
>> (tee hee).. This is an import of a .sql file being run from the command
>> line like so:
>
>C:\mysql\bin>>mysql < \dev_hotel_data.sql
>
>> These things can't timeout, can they?
>
>No really. But you could hit the communications buffer size (though that
>does not seem likely at all with your .sql file). Anyway, it can't
>help to try the following:
>
>C:\mysql\bin>>mysql --max-allowed-packet=32M < \dev_hotel_data.sql
>
>Regards,
>--
>  Stefan Hinz <[EMAIL PROTECTED]>
>  iConnect GmbH <http://iConnect.de>
>  Heesestr. 6, 12169 Berlin (Germany)
>  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3
>
>[filter fodder: sql, mysql, query]
>
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Re[4]: Import Batch syntax error

2003-03-20 Thread Tab Alleman
Stefan Hinz wrote:

> No really. But you could hit the communications buffer size
> (though that does not seem likely at all with your .sql
> file). Anyway, it can't help to try the following:
> 
> C:\mysql\bin>>mysql --max-allowed-packet=32M < \dev_hotel_data.sql
> 
> Regards,

Thanks, I'll try that... But in the meantime, is there something I can
do to get Mysql to show me more information about the syntax error?  I
think that the difference in the parser might be causing my line-numbers
to be off.  I went into my text editor and replaced the line that had
the "error" with a blank line, and when I ran it again it still reported
the same error on the same line #...So I'm wondering if there's a better
way to get Mysql to give me more clues as to which line is causing the
error.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re[4]: Import Batch syntax error

2003-03-20 Thread Stefan Hinz
Tab,

>> Are you running this from a script? Maybe it's just a script
>> timeout which would stop with the following line when it gets the
>> timeout: 

> Oops, no sorry for all those who don't know where I left off yesterday
> (tee hee).. This is an import of a .sql file being run from the command
> line like so:

C:\mysql\bin>>mysql < \dev_hotel_data.sql

> These things can't timeout, can they?  

No really. But you could hit the communications buffer size (though that
does not seem likely at all with your .sql file). Anyway, it can't
help to try the following:

C:\mysql\bin>>mysql --max-allowed-packet=32M < \dev_hotel_data.sql

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Re[2]: Import Batch syntax error

2003-03-20 Thread Tab Alleman
Stefan Hinz wrote:
> 
> Are you running this from a script? Maybe it's just a script
> timeout which would stop with the following line when it gets the
> timeout: 

Oops, no sorry for all those who don't know where I left off yesterday
(tee hee).. This is an import of a .sql file being run from the command
line like so:

C:\mysql\bin>mysql < \dev_hotel_data.sql

These things can't timeout, can they?  

Mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re[2]: Import Batch syntax error

2003-03-20 Thread Stefan Hinz
Tab,

> On Thursday 20 March 2003 18:51, Tab Alleman wrote:
>> Still trying to get all the way through my import batch file.
>>
>> Now I'm getting a syntax error on a certain line of the file, and a
>> subsequent run produced the same exact error on the same exact line, but
>> I can't see anything wrong with that line.
>>
>> Here's the line that produces the error:
>>
>> INSERT INTO `tmphotelinfo` VALUES("yvr100058","yvr","Holiday Inn
>> Metrotown","4405 Central Blvd.","","Burnaby","BC","V5H 4M3","","(604)
>> 438-1881","(604) 438-1883","AE D MC V \r");
>>
>> Here's the error:
>>
>> ERROR 1064 at line 1036960: You have an error in your SQL syntax near
>> '"' at line 1

> It works fine for me without any error.

Are you running this from a script? Maybe it's just a script timeout
which would stop with the following line when it gets the timeout:

INSERT INTO `tmphotelinfo` VALUES("yvr100058","yvr","Holiday Inn
Metrotown","4405 Central Blvd.","","Burnaby","BC","V5H 4M3",""

For MySQL, that would simply be a syntax error.

Try to remove one line at the beginning of the dumpfile, and see if
the error occurs at the next line. If that's true, set the timeout
limit of your script higher.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



re: Import Batch syntax error

2003-03-20 Thread Egor Egorov
On Thursday 20 March 2003 18:51, Tab Alleman wrote:
> Still trying to get all the way through my import batch file.
>
> Now I'm getting a syntax error on a certain line of the file, and a
> subsequent run produced the same exact error on the same exact line, but
> I can't see anything wrong with that line.
>
> Here's the line that produces the error:
>
> INSERT INTO `tmphotelinfo` VALUES("yvr100058","yvr","Holiday Inn
> Metrotown","4405 Central Blvd.","","Burnaby","BC","V5H 4M3","","(604)
> 438-1881","(604) 438-1883","AE D MC V \r");
>
> Here's the error:
>
> ERROR 1064 at line 1036960: You have an error in your SQL syntax near
> '"' at line 1

It works fine for me without any error.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Import Batch syntax error

2003-03-20 Thread Tab Alleman
Still trying to get all the way through my import batch file.  

Now I'm getting a syntax error on a certain line of the file, and a
subsequent run produced the same exact error on the same exact line, but
I can't see anything wrong with that line.

Here's the line that produces the error:

INSERT INTO `tmphotelinfo` VALUES("yvr100058","yvr","Holiday Inn
Metrotown","4405 Central Blvd.","","Burnaby","BC","V5H 4M3","","(604)
438-1881","(604) 438-1883","AE D MC V \r");

Here's the error:  

ERROR 1064 at line 1036960: You have an error in your SQL syntax near
'"' at line 1

Here's the previous line, which apparently doesn't cause an error:

INSERT INTO `tmphotelinfo` VALUES("yvr100057","yvr","Holiday Inn Hotel &
Suites","1110 Howe Street","","Vancouver","BC","V6Z 1R2","","(604)
684-2151","(604) 684-4736","AE D MC V \r");

I see no appreciable difference between the lines.  

Here's the line which creates the tmphotelinfo table:

CREATE TABLE `tmphotelinfo` (
  `OrgID` varchar(9) default NULL,
  `MetroCode` char(3) default NULL,
  `Name` varchar(100) default NULL,
  `Address1` varchar(100) default NULL,
  `Address2` varchar(100) default NULL,
  `City` varchar(50) default NULL,
  `State` varchar(10) default NULL,
  `Zip` varchar(16) default NULL,
  `Country` varchar(50) default NULL,
  `Phone` varchar(24) default NULL,
  `Fax` varchar(24) default NULL,
  `CCs` varchar(32) default NULL,
  KEY `OrgID` (`OrgID`)
) TYPE=MyISAM;

...and finally, there's nothing in the mysql.err file to give me a
further clue.  Does anybody here see something I don't?




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php