(1064, "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 'source process_new_students_temp.sql' at line 1")
any ideas?
thanks-
erin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On 2006-0830 14:47:15, SourceForge.net wrote:
> c.execute("source file.sql;")
> [...]
> any ideas?
if all you need is execute an sql script from python, you may consider using the function parseSql, contained in the ibo3 module to be found on http://sourceforge.net/projects/ibo
maybe there are better tools doing the same, this one works (for me)...
use it like this:
import ibo3 [c.execute(i) for i in ibo3.parseSql('file.sql')]
> thanks-
HTH,
Mario
p.s.:
bugreports welcome.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
from the MySQL command line
source file.sql;
works as expected.
from a python shell,
c.execute("source file.sql;")
gives me the error message
(1064, "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 'source process_new_students_temp.sql' at line 1")
any ideas?
thanks-
erin
On 2006-0830 14:47:15, SourceForge.net wrote:
> c.execute("source file.sql;")
> [...]
> any ideas?
if all you need is execute an sql script from python, you may consider using the function parseSql, contained in the ibo3 module to be found on http://sourceforge.net/projects/ibo
maybe there are better tools doing the same, this one works (for me)...
use it like this:
import ibo3
[c.execute(i) for i in ibo3.parseSql('file.sql')]
> thanks-
HTH,
Mario
p.s.:
bugreports welcome.
source is not actually an SQL statement but instead a built-in feature of the command-line client.