MySQL Forums
Forum List  »  MySQL Query Browser

Re: source command through mysql query browser
Posted by: David Sadler
Date: December 13, 2009 09:32AM

Mukesh,

Thanks for starting this thread.

1) From the MySQL Command Line Client...

These commands run:
SOURCE
LOAD DATA LOCAL INFILE

2) From the MySQL Query Browser script tab...

These commands run:
LOAD DATA LOCAL INFILE

These commands fail:
SOURCE

Error received:
ErrorNr. 1064
Script line: 9 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'C:/Documents and Settings/Owner.myclientcomputername/Desktop/my_project_folder/tbl_project/cr_tbl_proje' at line 1

See the full commands with syntax in the NOTES section.

MySQL documentation for both the Query Browser and the Command Line Client do not discuss why the Query Browser behaves differently than the Command Line Client. Nor is there any example of how to run a 'source' command from within a Query Browser script tab.

A web search on this issue produces many people raising this issue but no one providing the solution. If we can determine the proper method to run the SOURCE command in a Query Browser script tab, we can publish it here. If the SOURCE command can not be run from a Query Browser script tab, we can publish that also to save others many hours of research.

David Sadler
winXP media center sp3
MySQL 5.1.30 community server
MySQL Connector Net 5.2.5
MySQL Query Browser 1.2.14
Visual Studio 2008 Pro


NOTES:

SOURCE command and syntax:
source C:/Documents and Settings/Owner.myclientcomputername/Desktop/my_project_folder/tbl_project/load_tbl_project.sql;

LOAD DATA LOCAL INFILE command and syntax:
LOAD DATA LOCAL INFILE 'C:/Documents and Settings/Owner.myclientcomputername/Desktop/my_project_folder/tbl_project/data_project.txt' INTO TABLE project fields terminated by '\t' lines terminated by '\r\n';

ERROR GENERATED FROM RUNNING A 'SOURCE' COMMAND IN A MYSQL QUERY BROWSER SCRIPT TAB:
ErrorNr. 1064
Script line: 9 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'C:/Documents and Settings/Owner.myclientcomputername/Desktop/my_project_folder/tbl_project/cr_tbl_proje' at line 1

Options: ReplyQuote


Subject
Written By
Posted
Re: source command through mysql query browser
December 13, 2009 09:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.