Description: In HSQLDB I could enter several commands directly in Tools > SQL: ALTER TABLE "Adresse" ADD "Vorname" VARCHAR(25) BEFORE "Name" ALTER TABLE "Adresse" ADD "email" VARCHAR(50) BEFORE "Name" All were executed together at once. In Firebird only one command can be entered and executed. Several commands: ALTER TABLE table_name ALTER field_name POSITION 1 ALTER TABLE table_name ALTER field_name2 POSITION 2 ALTER TABLE table_name ALTER field_name3 POSITION 3 or ALTER TABLE table_name ALTER field_name POSITION 1; ALTER TABLE table_name ALTER field_name2 POSITION 2; ALTER TABLE table_name ALTER field_name3 POSITION 3 or ALTER TABLE table_name ALTER field_name POSITION 1, ALTER TABLE table_name ALTER field_name2 POSITION 2, ALTER TABLE table_name ALTER field_name3 POSITION 3 result in this error message: *Token unknown - line 2, column 1 *ALTER caused by 'isc_dsql_prepare' It is time consuming to enter each command separately. Steps to Reproduce: 1. enter in Tools > SQL: ALTER TABLE table_name ALTER field_name POSITION 1 ALTER TABLE table_name ALTER field_name2 POSITION 2 ALTER TABLE table_name ALTER field_name3 POSITION 3 or ALTER TABLE table_name ALTER field_name POSITION 1; ALTER TABLE table_name ALTER field_name2 POSITION 2; ALTER TABLE table_name ALTER field_name3 POSITION 3 or ALTER TABLE table_name ALTER field_name POSITION 1, ALTER TABLE table_name ALTER field_name2 POSITION 2, ALTER TABLE table_name ALTER field_name3 POSITION 3 Actual Results: error message: *Token unknown - line 2, column 1 *ALTER caused by 'isc_dsql_prepare' Expected Results: 1: Reproducible: Always User Profile Reset: Yes Additional Info: no other info
Have tested this with the described command ALTER TABLE table_name ALTER field_name POSITION …; and also with INSERT INTO table_name (fieldname) VALUES(…); Could only execute one command. Delimiter ';' doesn't work in Firebird. Seems it is the same behavior in Firebid server connecting by JDBC. So could be a special Firebird bug? All tested with LO 7.3.2.2 on OpenSUSE 15.3 64bit rpm Linux.
Searching "firebird multiple statements", just wonder if it's possible in Firebird. I found an old link here: https://stackoverflow.com/questions/1698114/firebird-multiple-statements about "execute block" Also: https://firebirdsql.org/manual/migration-mssql-syntax.html
I have also searched for it. Seems it is a little bit confused: https://www.firebirdsql.org/pdfmanual/html/isql-terminator.html The terminator seems to be a ';' by default. But it won't run from Base …
Seems Firebird needs a special EXECUTE BLOCK for this: execute block as begin INSERT INTO "table" ("ID") VALUES(4); INSERT INTO "table" ("ID") VALUES(5); INSERT INTO "table" ("ID") VALUES(6); end will work here.
in Tools > SQL: execute block as begin ALTER TABLE "0base" ALTER "eL1" POSITION 1; ALTER TABLE "0base" ALTER "eL2" POSITION 2; ALTER TABLE "0base" ALTER "eL3" POSITION 3; end results in: 1: firebird_sdbc error: *Dynamic SQL Error *SQL error code = -104 *Token unknown - line 3, column 3 *ALTER caused by 'isc_dsql_prepare' each SQL command alone works.