Criteria for Writing Compatible Queries

There are two criteria for writing a query that runs on both Sybase IQ and Adaptive Server Enterprise databases.

Sybase IQ supports the following subset of the Transact-SQL SELECT statement.

Syntax

SELECTALL | DISTINCT ] select-list
…[ INTO #temporary-table-name ]
…[ FROM table-spec,
…	 table-spec, … ]
…[ WHERE search-condition ]
…[ GROUP BY column-name, … ]
…[ HAVING search-condition ]
…| [ ORDER BY expressionASC | DESC ], … ] 	|
   | [ ORDER BY integerASC | 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 ]
…	
alias-name:
	identifier | 'string' | “string"

The sections that follow provide details on several items to be aware of when writing compatible queries.

Related concepts
Variables in Transact-SQL Procedures