Each <Expression> element represents an output expression in the SELECT list that is composite in the sense that it involves a literal expression, a SQL function, a string operation or a mathematical computation, or several of these. Such a composite expression must have a column alias.
Non-composite output expressions, that map directly to a database column, are represented by a <Column> element instead.
<Expression> elements have content and the following required attribute:
Attribute
|
Description
|
alias
|
The name of the alias of the output expression
|
The purpose of alias is to map information under the <Meta> element to information in the <Rows> element. The alias of each output expression must therefore be unique across the entire SQL statement. USoft attempts to disambiguate aliases automatically. Go to XML.SQLExport for details.
The content of the <Expression> element is the SQL output expression itself, with column names expanded to the format
where table-name is the table alias if one is available, or otherwise equals the full database table name. Any characters that are special to XML are replaced by predefined entities, eg., a single quote in the SQL output expression is replaced by ' . For example:
<Expression alias="TourTitle">TOUR.DESTINATION || ' ' || TOUR.TOUR_TYPE</Expression>
|
XML.SQLExport can still export data if there is no table in the FROM clause of the SELECT statement. In that case the <OutputExpressions> element will not contain any <Column> elements, but only one or more <Expression> elements.
|