Contents Index Creating compatible tables Compatibility of joins

ASA SQL User's Guide
  Transact-SQL Compatibility
    Writing compatible SQL statements

Writing compatible queries


There are two criteria for writing a query that runs on both Adaptive Server Anywhere and Adaptive Server Enterprise databases:

This section explains compatible SELECT statement syntax, and assumes compatible data types, expressions, and search conditions. The examples assume the QUOTED_IDENTIFIER setting is OFF: the default Adaptive Server Enterprise setting, but not the default Adaptive Server Anywhere setting.

Adaptive Server Anywhere supports the following subset of the Transact-SQL SELECT statement.

Syntax 

SELECT [ ALL | DISTINCT ] select-list
...[ INTO #temporary-table-name ]
...[ FROM table-spec [ HOLDLOCK | NOHOLDLOCK ],
...    table-spec [ HOLDLOCK | NOHOLDLOCK ], ... ]
...[ WHERE search-condition ]
...[ GROUP BY column-name, ... ]
...[ HAVING search-condition ]
   [ ORDER BY { expression | integer }
      [ ASC | DESC ], ... ]

Parameters 

select-list:
 table-name.*
|  *
expression
alias-name = expression
expression as identifier
expression as T_string

table-spec:
owner . ]table-name
...[ [ AS ] correlation-name ]
 ...[ ( INDEX index_name [ PREFETCH size  ][ LRU | MRU ] ) ]

alias-name:identifier :
 | 'string' | "string"

For a full description of the SELECT statement, see SELECT statement.

Adaptive Server Anywhere does not support the following keywords and clauses of the Transact-SQL SELECT statement syntax:

Notes 

Contents Index Creating compatible tables Compatibility of joins