Skip to main content
Administrator Guide
Last Updated: 2026-05-15
Reference: WQL Query Usage and Guidelines for Data Export

Reference: WQL Query Usage and Guidelines for Data Export

Workday Query Language (WQL)

Workday Query Language (WQL) is a SQL-like language with some expressions and operators that you can use to optimize query performance when executing data export jobs. Workday validates query syntax to ensure it's valid for data export jobs.

WQL Expressions

To export data in bulk, you can use these SQL expressions in WQL to specify 1 or more fields (columns) from a table-backed Prism data source.
WQL doesn't support SELECT * .
WQL Clause
Option
Purpose
Usage Example
SELECT
Selects 1 or more fields from a Prism data source.
SELECT billingCompany, billingCostCenter, billingDivision
AS
Creates a name alias for a field (column).
SELECT billingCompany AS company, billingCostCenter AS cost_center, billingDivision AS division
FROM
Specifies a Prism data source to export data from.
SELECT billingCompany, billingCostCenter, billingDivision FROM cds_insuranceClaimData
WHERE
Specifies a Prism data source to filter specific data from.
SELECT billingCompany, billingCostCenter, billingDivision FROM cds_insuranceClaimData WHERE billingCost >= 100
To filter date fields, use this WQL clause:
TO_DATE()
. Example:
SELECT claim_Id, accounting_Date, agent, claim_Source, cost_Center from cds_OCFR_TBL where accounting_Date <= TO_DATE('2012-12-26','yyyy-MM-dd')

WQL Conditional Expressions

You can use these types of operators to create conditions in WQL expressions that limit or filter the data to extract from a Prism data source:
  • Logical: Filters query results based on inclusion and exclusion criteria.
  • Comparison: Compares a field to one or more values and filters the query results based on comparison criteria.
You can create as many conditions as you need and can use conditional statements in any combination.
This table describes the purpose and usage examples of logical operators:
Operator
Purpose
Usage Example
AND
Exports results that meet all conditions.
SELECT billingCompany, billingCostCenter, billingDivision FROM cds_insuranceClaimData WHERE billingCost >= 100 AND billingCost <= 9999
OR
Exports results when either of the conditions are met.
SELECT billingCompany, billingCostCenter, billingDivision FROM cds_insuranceClaimData WHERE billingCost >= 100 OR billingCost <= 9999
NOT
Exports results that meet the negated condition.
SELECT billingCompany, billingCostCenter, billingDivision FROM cds_insuranceClaimData WHERE NOT (billingCost >= 100 AND billingCost <= 9999)
This table describes the purpose and usage examples of comparison operators:
Operator
Purpose
Usage Example
= (equal)
Exports 1 or more specified fields that equals the value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost = 100
!= (not equal)
Exports 1 or more specified fields that don’t equal the value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost ! = 100
> (greater than)
Exports 1 or more specified fields that are greater than the value.
SELECT billingCost FROM cds_insuranceClaimData WHERE billingCost > 100
>= (greater than or equal to)
Exports 1 or more specified fields that are greater than or equal to the value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost >= 100
< (less than)
Exports 1 or more specified fields that are less than the value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost < 100
<= (less than or equal to)
Exports 1 or more specified fields that are less than or equal to the value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost <= 100
IN
Exports 1 or more specified fields that equal 1 or more of the (comma separated) values.
SELECT billingCompany FROM cds_insuranceClaimData WHERE claimStatus IN ('in-progress', 'open')
NOT IN
Exports 1 or more specified fields that don’t equal 1 or more of the (comma separated) values.
SELECT billingCompany FROM cds_insuranceClaimData WHERE claimStatus NOT IN ('in-progress', 'open')
IS NULL
Exports 1 or more specified fields that have no value.
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost IS NULL
IS NOT NULL
Exports 1 or more specified fields that have
SELECT billingCompany FROM cds_insuranceClaimData WHERE billingCost IS NOT NULL

WQL Functions

WQL supports 2 SQL functions that enable you to retrieve data-related information from instance fields:
  • GET_DISPLAY_ID
  • GET_REF_ID
When you use more than 1 function in the query, you must specify a unique alias name to each function using the AS option. Example: GET_DISPLAY_ID(cost_Center) AS cost_center.
Function Usage
Purpose
Usage Examples
GET_DISPLAY_ID(<Instance Field Name>)
Retrieves the data display name of the specified instance field.
SELECT GET_DISPLAY_ID(billingCompany) AS billing_company FROM cds_insuranceClaimData SELECT billingCostCenter FROM cds_insuranceClaimData WHERE GET_DISPLAY_ID(billingCompany) = 'CompanyXYZ'
GET_REF_ID(<Instance Field Name>,'<Reference ID Type>')
Retrieves the reference id of the specified instance field.
SELECT GET_REF_ID(billingCompany, 'Company_Ref_ID') FROM cds_insuranceClaimData SELECT billingCostCenter FROM cds_insuranceClaimData WHERE GET_REF_ID(billingCompany, 'Company_Ref_ID') = 'XYZ_Company'