This tab allows you to specify a number of options relating to the type of SQL statement built.
This is the normal statement.
This is discussed in WITH Statements.
A Select Into creates a table containing the results of the query. Enter the name of the table you are creating in Table Name.
This option is only available for some databases such as SQL Server and Sybase ASE.
This will create a View from the query.
Enter the name of the View and whether (Include Col List) the column list is to be included in the View definition.
When you click on Run the view will be created. If you run it a second time you will get an error that the view already exists.
This option can used for coding other typers of queries.
Specify the “wrapper” for the query. The wrapper is the SQL statement which contains your query. When coding this wrapper text, specify $sql where the query-sql is to be placed.
This specifies a TOP clause for SQL Server and Teradata. This returns the initial set of rows returned by the query.
This is a clause that can appear between the SELECT keyword and the column list.
Example for Teradata and SQL Server:
This is a clause that is added to the end of your SQL.
FETCH FIRST 1000 ROWS ONLY, OPTIMIZE FOR 1000 ROWS, WITH UR
When your query is parsed into the Query Builder (for instance from the Run SQL window) it may be preceded with Comments or AQT scripting statements (such as queryparm or setparm). AQT will not remove these comments and scripting commands; they will remain with the query. You can view or amend these in the Comments and Commands box.
AQT will only retain comments which precede your SQL. Comments that are contained within your SQL query will be removed when AQT imports the query into the Query Builder.
Clicking Disable will "remove" the command from your query. This is useful to prevent a queryparm command running every time you run the query.