Hi
I have a load of sql files that i need to be able to import into derby.
What delimiter do i need at the end of the statements in order for derby to
see it as a seperate query. i presumed that this would be ; but this doesnt
work. I've tried all variants i can think of but none of them work.
insert into MeasurementColumn values
("test","test",1,"test",2,3,4,5,"test","test","test","test",6);
insert into MeasurementColumn values
("test1","test1",1,"test1",2,3,4,5,"test1","test1","test1","test1",6);
ERROR 42X01: Syntax error: Encountered ";" at line 2, column 129.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at com.test.CreateDatabase.insertTestData(CreateDatabase.java:153)
at com.test.CreateDatabase.main(CreateDatabase.java:247)
If i leave it as a blank line between the statements it doesnt recogonise
the second statement.
insert into MeasurementColumn values
("test","test",1,"test",2,3,4,5,"test","test","test","test",6)
insert into MeasurementColumn values
("test1","test1",1,"test1",2,3,4,5,"test1","test1","test1","test1",6)
ERROR 42X01: Syntax error: Encountered "insert" at line 3, column 1.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at com.test.CreateDatabase.insertTestData(CreateDatabase.java:153)
at com.test.CreateDatabase.main(CreateDatabase.java:247)
Thanks for the help
Dexter
--
View this message in context:
http://www.nabble.com/sql-format-in-*.sql-files-tp15479296p15479296.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.