Back to

Running the query

Advanced run options

On the Run pane, click the horizontal Advanced Run Options bar on the right to use advanced settings.

Close application after running: Select this option to close QUERY after a query runs. This option is a good choice for unattended runs.

Auto logon file: Select the auto logon file (ALF) you would like to use. For more information, see Automating your logon.

Data chunk value: This setting can help performance when you are extracting a large number of records. By default, for single table queries, QUERY calculates the optimum chunk value for the run based on query characteristics, such as total field length and number of records to extract. With the data chunk value set, QUERY fetches only the number of records for each chunk that you can specify. The maximum allowed value for chunk size is 450000. A Stop button also appears so that you can stop the extraction if it is running for too long.

Data chunk value is not available for InfoSets/SAP queries.

Run as SAP Background Process: Select this to for a cleaner run to keep the data file closed during the run.

Enable Adaptive Query Throttling: Available only when the administrator grants permission. When the throttling algorithm is applied, query execution slows as the system load increases; however, without the algorithm, the query executes in constant time and competes for resources with other transactions on the system.

Adaptive Query Throttling is not available for logical databases or for InfoSets and SAP queries.

Note: Although disabling this option while running the query can improve query performance, the risk is that it can crash the server when it is already overloaded. Hence, we recommend that you always run queries with this option enabled unless it is certain that the SAP server is not highly loaded.

Linking query scripts

You can link scripts to be run on Central. Linked scripts can also be scheduled. For more information, see "Scheduling a query."

Although you can link as many scripts as you want, but there is a limit of 25 joined tables per query.

Link QUERY script: Select this check box to enable linking of QUERY scripts. In the text box, specify the name of the next QUERY script to be linked. For more information,

Data File Carry Settings: In addition to specifying the QUERY script name, you can also mark which execution settings are to be carried forward to the next QUERY script in a chain by using any of these check boxes:

If the second file uses cell-based mapping with loops, you are prompted to provide the name of the log column before the second file runs.

Linked scripts with run time variables

You can link query scripts with multiple run time variables. While running the linked query scripts, QUERY prompts you to enter run time variables for each of the linked script file.

The Run time variable wizard displays the fields to enter values of variables. You can type in the values manually or fetch the values from SAP using the browse button .

Note: Linked query script files must be in production status before they can be scheduled for running.

Result file options (not available for Winshuttle Central)

Save and close output file after run: Click to save the contents of the data file and close it after a data download.

Warn if data is present on result file: Click to be warned if there is already contents in the output file. You are given the options to save as a new file, Cancel, or write to the file. Writing to the file presents three more options, which you can also set in the Data writing options.

Write header information on result file: Not available for Access or text files.

Write field expression: Available only for queries from a single table or output to a text file. Selecting this option writes only the field name to the header and not the table name.

Write field expression is always selected for logical databases and for InfoSets and queries, and you cannot change this setting.

Data writing options

Clear mapped columns or Clear result file: Clear mapped columns clears data from the start row to the end row of sheet or column. Available only for Excel files.

Clear result file clears all contents from a file or table. Available for text and XML files, and for Access and SQL Server tables.

Append data to result file: Appends data to the existing data. Not available for XML files.

Overwrite existing data: Overwrites the data. Available only for Excel files.

Using macros with Query

For details and sample code, see the Using macros with Winshuttle PDF file.

Also in this section

Running

Publishing macros in an Excel workbook

Running QUERY from the command line

Using the add-in for Excel

Using saved queries