Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

In most eSQL queries, reference is made to the FROM clause from the WHERE or SELECT clause. The class types in the FROM clause or their elements or subselects in the FROM clause are addressed via their name or assigned aliases.

Type Names

Each type, whether complex or simple, user-defined or system, has a name and a qualified name.

...

Code Block
languagesql
SELECT [kunde].[sysid] FROM [customer] JOIN [dms]:[sysParent2Child] JOIN [invoice]

Alias

Aliases can be used after class types or subselects in the FROM clause or after expressions in the SELECT clause. The keyword AS can be used between the class type and the subselect or the expression and the alias, but it does not have to. In the same way as type names, aliases may consist of the characters {'a',…, 'z,' 'A',…., 'Z', '0',…, '9'} and have to start with a letter.

Aliases in the FROM Clause

The alias is used to give a new name to the class type, with which it can be referenced.

...

Code Block
languagesql
SELECT [o]
FROM( SELECT [o] FROM [dms]:[email] AS [o]
UNION ALL
SELECT [o] FROM [dms]:[invoice] AS [o]
) AS [u],
[dms]:[sysParent2Child] AS [r]
WHERE [sysid1]=[sysid]

Aliases in the SELECT Clause

In the SELECT clause, aliases are mainly used  to have meaningful titles in the result table.

...

Code Block
languagesql
SELECT [f]
FROM [sysFolder] AS [f]
JOIN [dms]:[sysParent2Child] AS [r],
( SELECT [e] AS [o] FROM [dms]:[email] AS [e]
UNION ALL
SELECT [r] AS [o] FROM [dms]:[invoice] AS [r]
) AS [u]
WHERE [r].[sysid2]=[u].[o].[sysid]

Masking

Type names and aliases can optionally be masked with square brackets. This is only mandatory if a name or alias is the same as an eSQL keyword.

...

Code Block
languagesql
SELECT [p].firstname FROM dms:person AS p

Case Sensitivity

Case sensitivity does not play a role in type names and aliases.

...