In addition to supporting Transact-SQL alternative syntax, SQL Anywhere provides aids for translating statements between the Watcom SQL and Transact-SQL dialects. SQL language built-in functions returning information about SQL statements and enabling automatic translation of SQL statements include:
SQLDIALECT( statement ) Returns Watcom-SQL or Transact-SQL.
WATCOM SQL( statement ) Returns the Watcom-SQL syntax for the statement.
TRANSACTSQL( statement ) Returns the Transact-SQL syntax for the statement.
These are functions, and so can be accessed using a select statement from Interactive SQL. For example, the following statement returns the value Watcom-SQL:
SELECT SQLDIALECT( 'SELECT * FROM Employees' ); |
Translating a stored procedure
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |