This section provides information about the SQL statements that the XML driver processes, and about SQL standards and conventions that the driver supports:
■
■
■
■ NOTE: See the table at the beginning of this chapter for the SQL statements that the XML driver supports for the different types of supported file formats.The XML driver uses SQL grammar that is compliant with entry level ANSI SQL-92. Table 19-7 summarizes significant extensions to the grammar.
Table 19-7. SQL Extensions A regular identifier must begin with a letter and may not exceed 128 characters. In addition, all ASCII characters are converted to uppercase.
■ Delimited identifiers may not exceed 128 characters. A double quotation character can be embedded within the string by specifying two consecutive double quotation mark characters. A delimited identifier can span multiple lines. The body of a delimited identifier can contain any character except the newline character.
■
■
■
■
■
■
■
■
■ Character string literals are delimited with single quotation mark characters. A single quotation mark character can be embedded within the string by specifying two consecutive single quotation mark characters. A character string literal can span multiple lines.
■ A GUID uses the following format, where x is a hexadecimal digit:Hex literal values are introduced with an uppercase X followed by a single quoted string of hexadecimal characters.
■ Date, time, and timestamp literals are date, time, and timestamp values surrounded by a standard prefix and suffix. Date literals are specified in a YYYY-MM-DD format. Time literals are specified in an HH:MM:SS format with an optional fraction component. Timestamp literals are a concatenation of date and time values.
Table 19-8. Time and Date Literals {ts ’1999-09-19 11:11:11.225’} timestamp ’1999-09-19 11:11:11.225’ NOTE: ODBC 1.x style ODBC escape sequences such as the following are not supported:
Table 19-9. SQL Operators and Symbols A keyword may not be used as a regular identifier. For example, the following statement would generate a syntax error because INDICATOR is a keyword:You can, however, enclose a keyword in double quotation marks to form a delimited identifier. For example, the following statement is valid:Table 19-10 lists all of the keywords that are reserved for use in SQL statements or designated as potential future reserved words.
Table 19-10. Reserved Keywords ANSI SQL-92 standard comments (--) and C++ standard comments (/*...*/, //) are supported. Comments can be nested.