LO7.3.6 Win10, HSQL2.5.1
Hello,
Trying to create a macro which will append monthly transactions from one to another table and can not figure out where the mistake or missing part in the code is.
If below is run from Tools, SQl I get an - 1: unexpected token: FROM required: ) error
INSERT INTO “tblStatements” (“acc”,“mid”,“member”,“age”, “Fcat”, “pu”, “pterms_fk”) SELECT (“acc”,“mid”,“age”,“Fcat”,“pu”,“pterms_fk” FROM “vaqt”)
If run from inside a macro
Sub Testing
oConn = ThisDatabaseDocument.DataSource.getConnection("","")
SQL=oConn.createStatement()
result=SQL.executeQuery(“INSERT INTO ““tblStatements”” (”“acc”","“mid”","“member”","“age”", ““Fcat””, ““pu””, ““pterms_fk””, ““billto”” )_
“SELECT (”“acc”","“mid”","“age”","“Fcat”","“pu”","“pterms_fk”","“billto”" FROM ““vaqt””"")
End Sub
I get - BASIC syntax error.
Expected: ".
Would be grateful if someone can spot the error, thanks