Automatic Translation of Stored Procedures

In addition to supporting Transact-SQL alternative syntax, SQL Anywhere and Sybase IQ provide aids for translating statements between the Watcom-SQL and Transact-SQL dialects.

Functions returning information about SQL statements and enabling automatic translation of SQL statements include:

Functions enabling automatic translation

Function

Description

SQLDialect(statement)

Returns Watcom-SQL or Transact-SQL.

WatcomSQL(statement)

Returns the Watcom-SQL syntax for the statement.

TransactSQL(statement)

Returns the Transact-SQL syntax for the statement.

These are functions and thus can be accessed using a SELECT statement from ISQL. For example, the following statement returns the value Watcom-SQL:

SELECT SqlDialect('select * from Employees')