Previous Topic

Next Topic

Book Contents

Book Index

Scripting - Queryparm

This function prompts the user for the values of User-Defined Parameters. The following parameters are available:

Once you define parameters (with either queryparm or setparm), AQT will scan all subsequent statements for reference to the parameters. Parameters are referred to by preceding the parameter name with a $.

Example 1:

--aqt queryparm,parm=sdate,desc=Start Date

select * from order_details where order_date > '$sdate'

Example 2:

--aqt queryparm,parm=userid,desc=Userid,parm=pwd,desc=Password,pwd=y

--aqt connect,dbs=sample,user=$userid,pwd=$pwd

See the file batch_parms.sql, which is deployed with AQT, for more examples of the use of parameters.

Restrictions

Select

This allows you to specify:

To specify a date picker, code one of:

To specify a drop down list, specify either:

Examples:

--aqt queryparm,parm=sdate,desc="Start Date",select=date,value=<date>

--aqt queryparm,parm=type,desc=Type,select=(T,P,S),value=T

--aqt queryparm,parm=order,desc="Order Number",select=(select distinct order_number from order_details),value=<1>