---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps]
keyword: [Extend, Workday Query Language, WQL]
nav: wcp_docs
parent_url: /wcp_docs/
title: FROM
layout: subsection
---

<a id="d474e294"></a>
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.


## <a id="d474e305"></a>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)
```

## <a id="d474e333"></a>Arguments

<table><thead><tr><th><p>Argument</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><p><code><i>dataSourceAlias</i></code></p></td><td><p>The alias for the data source you want to access.</p></td></tr><tr><td><p><code><i>dataSourceFilterAlias</i></code></p></td><td><p>(Optional) The alias for the data source filter you want to use.</p></td></tr><tr><td><p><code>effectiveAsOfDate</code></p> <p><code>effectiveAsOfMoment</code></p> <p><code>entryDate</code></p> <p><code>entryMoment</code></p></td><td><p>(Optional) Run the query as of an effective date or entry date. Only supported for Standard Workday-delivered data sources.</p> <p>If you don't specify an effective or entry moment, the query returns results as of the current date and time.</p> <p>WQL supports these formats:</p><ul><li>Effective Date: <code>effectiveAsOfDate="2018-01-01"</code>
</li><li>Effective Date and Time: <code>effectiveAsOfMoment="2018-01-01 11:45:08"</code>
</li><li>Entry Date: <code>entryDate="2019-01-01"</code>
</li><li>Entry Date and Time: <code>entryMoment="2019-01-01 12:30:25Z"</code>
</li></ul> <p>WQL supports dates and datetimes in Coordinated Universal Time (UTC) or Pacific Standard Time (PST).</p> <p>WQL returns an error if you specify an <code>effectiveAsOfMoment</code> or an <code>entryMoment</code> when the data source doesn't support these values.</p></td></tr><tr><td><p><code><i>value1</i>, <i>value2</i>, ...<i>valueN</i></code></p></td><td><p>Values for the built-in data source prompts.</p></td></tr><tr><td><p><code><i>instance1</i>, <i>instance2</i>, ...<i>instanceN</i></code></p></td><td><p>The Workday ID of the field value you want to match.</p> <p>When you run a query, Workday validates the format of the Workday ID and fails the query when the format is invalid.</p></td></tr><tr><td><p><code><i>inst_refId</i></code></p></td><td><p>The reference ID type of a field in the conditional expression.</p></td></tr><tr><td><p><code><i>referenceID</i></code></p></td><td><p>The reference ID of the field value you want to match.</p> <p>Example: <code>(inst_refId = referenceID)</code></p></td></tr></tbody></table><br/>

## <a id="d474e595"></a>Examples

Return worker name from the <b>All Workers</b> data source:

```
SELECT fullName FROM allWorkers
```

Return a student name, academic unit, and level from the <b>Student Applications</b> 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 <b>All Workers</b> 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
```

