FROM
Specifies the data source and data source filter the
SELECT
clause retrieves data from. Workday requires this clause in any Workday Query Language (WQL) query.You can only access fields that:
- Workday has authorized for use with the Workday Report Writer or default areas.
- The current processing Workday account has permission to access.
Syntax
To query data from a data source:
FROM dataSourceAlias
To query data from a data source with a data source filter:
FROM dataSourceAlias(dataSourceFilter=filterAlias, filterPrompt1=value1, filterPrompt2=value2)
To query data from a data source using entry and effective date filters:
FROM dataSourceAlias(effectiveAsOfDate=date, entryMoment=dateTime)
Arguments
Argument
| Description |
|---|---|
dataSourceAlias
| The alias for the data source you want to access. |
dataSourceFilterAlias
| (Optional) The alias for the data source filter you want to use. |
effectiveAsOfDate effectiveAsOfMoment entryDate entryMoment | (Optional) Run the query as of an effective date or entry date. Only supported for
Standard Workday-delivered data sources. If you don't specify an effective or entry moment, the query returns results as of the current date and time. WQL supports these formats:
WQL supports dates and datetimes in Coordinated Universal Time (UTC) or Pacific Standard Time (PST). WQL returns an error if you specify an effectiveAsOfMoment or an entryMoment when the data source doesn't support these values. |
value1 , value2 , ...valueN
| Values for the built-in data source prompts. |
instance1 , instance2 , ...instanceN
| The Workday ID of the field value you want to match. When you run a query, Workday validates the format of the Workday ID and fails the query when the format is invalid. |
inst_refId
| The reference ID type of a field in the conditional expression. |
referenceID
| The reference ID of the field value you want to match. Example: (inst_refId = referenceID) |
Examples
Return worker name from the
All Workers
data source: SELECT fullName FROM allWorkers
Return a student name, academic unit, and level from the
Student Applications
data source and by specifying a data source filter:SELECT firstName, academicUnit, academicLevel FROM studentApplications (dataSourceFilter = studentApplicationsByAcademicUnitAndAcademicLevel, academicUnit = {Workday ID}, academicLevel = {Workday ID})
Return worker name in ascending order from the
All Workers
data source, using the effective moment and entry moment of the data values.SELECT worker FROM allWorkers (effectiveAsOfDate="2018-01-01", entryMoment="2019-01-01 12:30:00") ORDER BY worker ASC