Help with Multi-Statement SQLs in Microsoft Access
Posted: Mon 28 Mar 2016 22:22
Good morning all,
What I am about to ask WORKS with TUNIQUERY for SYBASE. Further, using this syntax in SQLDBX (a SQL editor) works with the Jet Engine BUT it does not work for TUNIQUERY for MS Access.
I have a block of code that;
1. CREATES A TEMPORARY TABLE
2. DOES SOMETHING WITH THIS TABLE
3. DROPS THE TEMPORARY TABLE
When I run this in Delphi I get a "characters found after end of SQL statement". It seems to me that its parsing to the first instance of a ";" (the first statement) and considering all after it to be rubbish.
Thus, no multi-statement SQLs for Access.
Am I missing something? As I said, works for SYBASE and the JET engine quite happily executes this code from any number of SQL editors (e.g. SQLDBX).
Any thoughts appreciated.
Regards
Tony Benci
What I am about to ask WORKS with TUNIQUERY for SYBASE. Further, using this syntax in SQLDBX (a SQL editor) works with the Jet Engine BUT it does not work for TUNIQUERY for MS Access.
I have a block of code that;
1. CREATES A TEMPORARY TABLE
Code: Select all
SELECT
t.*
INTO
tmp_table
FROM
Table as t;
Code: Select all
SELECT
tmp.*
FROM
tmp_tabl as tmp;
Code: Select all
DROP TABLE tmp_table;
Thus, no multi-statement SQLs for Access.
Am I missing something? As I said, works for SYBASE and the JET engine quite happily executes this code from any number of SQL editors (e.g. SQLDBX).
Any thoughts appreciated.
Regards
Tony Benci