<field_name> | ::= | [ [ ] <string> [ ] ] |
<alias> | ::= | [ [ ] <string> [ ] ] |
Field names are names of fields of the input records generated by an input format.
Aliases are alternative names for field-expressions, assigned in the
SELECT or USING clauses. When a field-expression in
the SELECT clause has been aliased, output formats will use the
alias as the name of the corresponding output record field.
The alias of a field-expression can be also used anywhere else in
the query as a shortcut that refers to the original
field-expression.
, ; < > = ! ' " @ * [ ] spaceField names and aliases containing spaces or illegal characters can be enclosed in square brackets ( [ and ] ), as in the following example:
SELECT [Last Request Time], [email@address], CPUTime as [Elapsed CPU Time] FROM perflog.csv WHERE [Elapsed CPU Time] > 0
SELECT Last\u0020Request\u0020Time FROM perflog.csv
A. Basic field-expressions
The SELECT clause in the following example query specifies "basic" field-expressions only:SELECT 'Event ID:', EventID, SYSTEM_TIMESTAMP() FROM SystemB. Derived field-expressions
The SELECT clause in the following example query specifies "derived" field-expressions only:SELECT TO_UPPERCASE(cs-uri-stem), SUM(sc-bytes) FROM \MyLogs\ex042805.log GROUP BY TO_UPPERCASE(cs-uri-stem)
© 2004 Microsoft Corporation. All rights reserved.