Previous Topic

Next Topic

Book Contents

Book Index

AQT scripting

In This Chapter

Startup script

Scripting functions

The scripting component of AQT allows you to run a set of SQL statements (and other AQT functions) without any prompting by AQT. This feature is useful for automating a series of queries and other functions.

AQT scripting is available for many AQT functions: these are detailed in Scripting Commands.

Scripting commands can be run from either:

Scripting syntax

The general syntax of an AQT scripting command is:

--aqt command,parameter=value,parameter=value


--aqt export,file=output.txt,type=csv,filemode=replace,prompt=no

All AQT scripting command start with -- (two minus signs), which is SQL syntax for a comment. This means that you can run your script using some other script processor (eg. SQLPlus, DB2 CLP etc) and the AQT script command will be ignored.

If your parameter value contains a comma, blank, or some other special character, you should enclose the value in double-quotes. The double-quote is used by the AQT batch processor to delimit values. Example:

--aqt export,file="customer data.txt",type=csv,filemode=replace,prompt=no

Functions and parameters are NOT case-sensitive.

Advanced Query Tool
© 2023 Cardett Associates Ltd. All rights reserved.