A query could contain some union’ed queries. This is similar to the sql usage, but limited in some way.

Parameters:

  • Query
  • Sort Order

Example: Query A could have a Union B and Union C query

SELECT * FROM (
	QUERY_B 
	UNION
	QUERY_C
) QUERY_A

Query

Condition

If a condition is set, the union query will be encapsulated and the condition is added with where.

Example: Query A could have a Union B and Union C query

SELECT * FROM (
	SELECT * FROM (QUERY_B) WHERE CONDITION_B
	UNION
	SELECT * FROM (QUERY_C) WHERE CONDITION_C
) QUERY_A