XML String
When you request to execute a query, you can either select the query name if it exists in the database, or use the XML string to request an ad hoc query. The same elements are used to define the XML string as defining the query to save. If you use XML string, it must contain at least one record, one field and one select.
<Records> Request must contain at least one record.
| Records Elements | Description |
|---|---|
|
RCDNUM |
Record number. |
|
RCDNAME |
Record name. |
|
RCDSELECTNUM |
Select number. |
|
CORRNAME |
Alias Name such as A,B,C, and so on. |
|
JOINTYPE |
Type of join. Valid values are:
Value is required only when the corresponding record is part of a JOIN in the query. |
|
JOINRCDALIAS |
Record with which join is done. Value is required only when the corresponding record is part of a JOIN in the query. |
|
JOINFIELD |
Field with which join is done. Value is required only when the corresponding record is part of a JOIN in the query. |
<Fields> Request must contain at least one field.
| Fields Elements | Description |
|---|---|
|
FIELDNUM |
Field number. |
|
FIELDNAME |
Field name. |
|
FIELDRCDNUM |
Record number. |
|
DESCR |
Description. |
|
AGGREGRATE_TYPE |
Aggregation type. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
HEADING_TYPE |
Heading type. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
HEADING |
If the HEADING_TYPE is Heading, this element is used to enter the heading text. |
|
COLUMNNUM |
Column number. |
|
ORDERBYNUM |
Order by number. |
|
ORDERBYDIR |
Direction of field ordering. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
FIELDSELECTNUM |
Identifier of SELECT in which this field is included. |
|
EXPRESSION_AS_FIELD |
A valid expression number when an expression is used as a field. |
<Criteria> Enter criteria information.
| Criteria Elements | Description |
|---|---|
|
CRTNUM |
Criterion number. |
|
CRTNAME |
Criterion name. |
|
CRTHAVINGFLAG |
True if specifying a HAVING clause. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
CRTSELECTNUM |
Selectnumber. |
|
CRTNEGATION |
Negation in criterion. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
CONDITION_TYPE |
Condition type in criterion. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
LEFT_PARENTHESIS_LEVEL |
Left parenthesis level specified from 0 onwards. Used for GROUP BY. |
|
RIGHT_PARENTHESIS_LEVEL |
Right parenthesis level specified from 0 onwards. Used for GROUP BY. |
|
CRTEXP1TYPE |
Expression 1 type in criterion. |
|
CRTEXP1TEXT |
Expression text for criterion 1. |
|
CRTEXP1RCDALIAS |
Record alias for record used in expression 1 in criterion. |
|
CRTEXP1FIELD |
Field used in expression 1 for criterion. |
|
CRTEXP2RCDALIAS |
Record alias for record used in expression 2 for criterion. |
|
CRTEXP2FIELD |
Field used in expression 2 for criterion. |
|
CRTEXP2TYPE |
Expression 2 type in criterion. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
CRTEXP2TEXT |
Expression 2 text. |
|
CRTLOGICALOPER |
Logical operator that links the criteria. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
<Expressions> Enter expression information.
| Expressions Elements | Description |
|---|---|
|
EXPNUM |
Expression Number. |
|
EXPSELECTNUM |
Expression's SELECT Number. |
|
EXPNAME |
Expression Name. |
|
EXPTYPE |
Expression Type. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
EXPLENGTH |
Expression Length. |
|
EXPDECIMALPOS |
Number of Decimal Places. |
|
EXPTEXT |
Expression Text. |
|
EXPAGGREGATE |
Specifies if the expression is an aggregate function. |
<Prompts> Enter prompt information.
| Prompt Elements | Description |
|---|---|
|
PROMPT_NUM |
Prompt number. |
|
PROMPT_NAME |
Unique prompt name. This is the UniquePromptName value returned from the service operation QAS_LISTQUERYPROMPTS_OPER. |
|
PROMPT_FLDNAME |
Name of the field used as prompt. |
|
PROMPT_UNIQUE_NAME |
Unique prompt name. |
|
PROMPT_TABLE |
Prompt table |
|
PROMPT_EDITTYPE |
Edit type. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
PROMPT_HEADING |
Heading of prompt. |
|
PROMPT_HEADINGTYPE |
Type of prompt heading. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
PROMPT_FLDLENGTH |
Field length for prompt. |
|
PROMPT_FLDDECIMALPOS |
Number of decimal positions in prompt. |
<Select> XML String must include at least one select.
| Select Elements | Description |
|---|---|
|
SELECTNUM |
SELECT number. |
|
PARENTSELECTNUM |
Number of parent SELECT. For main SELECT, this must be set to 0. |
|
SELECTTYPE |
Type of selection. Note: For valid values, see QAS_SAVE_QUERY_OPER. |
|
QRYDISTINCT |
Indicate whether this query is distinct. Note: For valid values, see QAS_SAVE_QUERY_OPER. |