12/11/2001 05:32:28, "PI Xu" <[EMAIL PROTECTED]> wrote: >Hi, Buddies: > >I used perl to run sql commands from a Text file, it always can't finish >totally and report error in unstable lines . >The error report that sql syntax error, but the syntax is same, just same, >and many sql lines; >Would you please tell me what this happen and how to resolve it? > >Thanks in Advance! >Bill > >PERL COMMANDS: system('mysql -uusername -ppassword database < >pricfile.sql'); > >if pricfile.sql has 37871 lines sql commands like >update products set retail=43.00 where partno='123456'; >then the perl program give > ERROR 1064 at line 37850: You have an error in your SQL syntax near >''99922' at line 1 >
I think you should have a look at the lines 37849 and 37850. The error could be that the previous one was wrongly terminated, or the current one has an invalid value. It could be a problem of unproper quoting. Having a look at the lines involved could be helpful. How did you produce the file? Bye Giuseppe > >if pricfile.sql has 19999 lines, then the perl program give >ERROR 1064 at line 19932: You have an error in your SQL syntax near '' at >line 1 > >if pricfile.sql has 17872 lines sql commands like, then the perl program >give >ERROR 1064 at line 17848: You have an error in your SQL syntax near '' at >line > > >--------------------------------------------------------------------- >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