selectUnion()
Overview
public query function selectUnion(
required array selectDataArgs
, string union = "DISTINCT"
, string orderBy = ""
, numeric maxRows = 0
, numeric startRow = 1
)
Performs a UNION SELECT of two or more SQL queries. Accepts an array of structs of selectData() arguments.
Arguments
Name | Type | Required | Description |
---|---|---|---|
selectDataArgs | array | Yes | An array of structs of arguments to be passed to each selectData in the union. |
union | string | No (default="DISTINCT") | The type of UNION join: DISTINCT (default) or ALL |
orderBy | string | No (default="") | The sort order for the final dataset. Can only be column names contained in the first query, and not prefixed with object names |
maxRows | numeric | No (default=0) | Maximum number of rows to select |
startRow | numeric | No (default=1) | Offset the recordset when using maxRows |