Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-09

TSQLScript doesn't execute last statement not terminated by '; ' (FTerminator)

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ondrej Pokorny

Hello,

if I run this script with TSQLScript:

INSERT INTO A (ID) VALUES (1);
INSERT INTO A (ID) VALUES (2)

Only the first insert is executed. Not the second one - it's ignored because it lacks the terminating ';'. Furthermore, no exception is raised - so I even don't know about it! IMO it is a bug.

All 3 tools I have installed (pgAdmin for Postgres, SQL Studio for MSSQL and SQLDeveloper for Oracle) do not ignore the last unterminated statement. (Btw. Pascal doesn't either:)
begin
  one;
  two
end;

Should I fix it and send a patch?

MSSQL

Michael Van Canneyt
to Ondrej Pokorny
Ondrej Pokorny wrote 20 lines
Hello, if I run this script with TSQLScript: INSERT INTO A (ID) VALUES (1); INSERT INTO A (ID) VALUES (2) Only the first insert is executed. Not the second one - it's ignored because it lacks the terminating ';'. Furthermore, no exception is raised - so I even don't know about it! IMO it is a bug. All 3 tools I have installed (pgAdmin for Postgres, SQL Studio for MSSQL and SQLDeveloper for Oracle) do not ignore the last unterminated statement. (Btw. Pascal doesn't either:) begin   one;   two end; Should I fix it and send a patch?

Please do.

Michael.