FROM Clause

The FROM clause is used to designate a list of source tables that also serve as data sources (InfoBase tables) and are processed in the query. You can omit the sources description only if sources are completely defined in the list of selection fields.

Please note that the FROM clause is optional in the query language. It can be omitted if data sources are completely qualified in the selection fields list description included in the SELECT clause.

Indicate the source list after the FROM keyword. Generally, the source list is described by the following set of rules:

<Source list>
  |

 

<Source>[, <Source>[, …]]
    |
    <Source Description> [ <Joining List> ]
      | |
      |

<Join> [<Joining List>]

      |   |
      |
|
|

|
|
|
|
|
  [INNER] JOIN <Source Description>
BY<Filter Criterion> |
LEFT [OUTER] JOIN <Source Description>
BY<Filter Criterion> |
RIGHT [OUTER] JOIN <Source Description>
BY<Filter Criterion> |
FULL [OUTER] JOIN <Source Description>
BY<Filter Criterion>
      <Table> [[AS] <Source Alias>]
        |    
        <Table Name>[(<Parameters>)] | ( <Nested Query Description> )

Query data sources are listed in the list of sources (separated by commas). Each <Source> in the list of sources always includes a source description; besides this you can indicate a <Joining List> – rules for joining a source with other sources.

If you use an InfoBase table as a data source, <Source description> contains <Table name>.

If the source table is virtual, then you can indicate its formation <Parameters>.

You can also use a nested query as a query data source; in this case the source description contains <Nested Query Description>.

The data source description can also contain its alias. <Source alias> can later be used as an easy reference to the source.

1C:Enterprise Developer's Community