This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
This query executes just fine at the command line; but I am unsuccessful running it as a script even after looking at examples that seem identical!
mysql> source /WorkspaceForResourceProject/Scripts/ResourceTableCreate.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 '->resourceId INT(3) auto_increment primary key, ->aCate' at line 1
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 1
Here is the text of the ResourceTableCreate.sql file:
Here is the output with the continuation characters, "->", removed. I found instructions to use them all over the web as a continuation character. Has anyone exececuted a MySql script from the command line? I'm sure you have so what is incorrect with the above sql when run as a script? The syntax is not the same when running as a script as when running at the command line. It takes seconds to run so please try executing the script and let me know what error message you get. If you know how to modify the script so it can be executed, then please share that knowledge.