Previous Topic

Next Topic

Book Contents

Book Index

Running multiple statements

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.

multsql0

Formatting of statements in the SQL script

Setting the Statement Delimiter

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:

--aqt options,sdelim=@

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.

Two ways of running the script

Advanced Query Tool
https://www.querytool.com
© 2023 Cardett Associates Ltd. All rights reserved.