The Run SQL window allows you to run multiple SQL statements. Generally these would be action statements, however the window can also be used to run multiple Select statements.
This feature is often used to run a series of SQL statements supplied in a file OR a series of generated statements.
--) appearing anywhere is taken as a line comment – all the text from there to the end of the line will be removed from your SQL (see Including comments in your SQL for more on this).
REMor @ will be ignored.
*/. AQT will not remove such comments from your SQL; these will be passed to your database along with your SQL. This is useful if you wish to use comments in Stored Procedure text.
The statement delimiter used for running a script is given in Options > Run SQL > Statement Delimiter.
It is also possible to set the delimiter to be used for a particular script. This is done by having an --aqt options,sdelim command as the first statement in the script. Example:
Insert into TEST.DEPARTMENT values('A00', 'SPIFFY COMPUTER SERVICE DIV.', '000010', 'A00', NULL)@
Insert into TEST.DEPARTMENT values('B01', 'ADMINISTRATION SYSTEMS', '000020', 'A00', NULL)@
This delimiter is only used when running the script; it is not changed for the AQT session.
This option is suitable when your script is unlikely to have errors, so you do not need the pause/restart capability.
If any statement gets an error, the script will stop processing.