List:General Discussion« Previous MessageNext Message »
From:Jørn Dahl-Stamnes Date:October 5 2007 5:07pm
Subject:Re: Debugging batch sql statements
View as plain text  
On Friday 05 October 2007 16:50, Arun wrote:
> Baron,
> I am sourcing it. I do not know if that is the best way though.. I am
> running the insert statement from a mysql prompt  in a linux/windows
> machine.
> My script has a single build script which sources other scripts.
> build.sql
> ======
> source ./ddl/useraccount/useraccountddl.sql
> source ./mobchannel_db.sql
> source ./ddl/usercontent/usercontentddl.sql
> source ./ddl/userinfo/profilesddl.sql
> source ./ddl/system/systemddl.sql
> source ./ddl/shopping/retailitem.sql
> source ./ddl/shopping/shoppingddl.sql
> source ./ddl/rewards/userrewardsddl.sql
> source ./ddl/location/locationddl.sql
> source ./ddl/listing/listingddl.sql
> ===========================
> I will cd into the directory which contains the sql (so that '.' gets
> resolved) and do a mysql -u root -p and enter password and do a
> mysql>use dbname;
> mysql>source build.sql;
>
> ERROR 1064 (42000): 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 ')' at line 8.

foreach source
  do
    source <file>
    fix any error
  until no errors

-- 
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/
Thread
Debugging batch sql statementsArun5 Oct
  • Re: Debugging batch sql statementsBaron Schwartz5 Oct
    • Re: Debugging batch sql statementsArun5 Oct
      • Re: Debugging batch sql statementsJørn Dahl-Stamnes5 Oct
    • Re: Debugging batch sql statementsArun5 Oct