SnowConvert AI - Sybase IQ - SELECT¶
Description¶
Retrieves information from the database. (Sybase SQL Language Reference)
Warning
This syntax is partially supported in Snowflake.
Grammar Syntax¶
Sample Source Patterns¶
Row Limitation¶
Sybase allows row limitation in a query by using the TOP clause with an optional START AT. Snowflake does not support this syntax but it can be transformed as shown below to achieve the same functionality.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
Into Clause¶
In Sybase, a table can be defined by selecting multiple rows and defining a name to store the data retrieved. Snowflake does not support this behavior but can be emulated by doing a CREATE TABLE AS.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
Force Index¶
Snowflake does not contain indexes for query optimization.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
TABLE FUNCTIONS¶
Snowflake allows calling a stored procedure(when the procedure meets certain limitations) or a table value function in a FROM clause, but RESULTSETS and windowing cannot be used as parameters.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
OPEN STRING¶
Snowflake does not support OPENSTRING functionality.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
DML Derived Table¶
In Sybase, during execution, the DML statement specified in the dml-derived table is executed first, and the rows affected by that DML materialize into a temporary table whose columns are described by the REFERENCING clause. The temporary table represents the result set of dml-derived-table. Snowflake does not support this behavior.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
KEY JOIN¶
Snowflake does not support KEY join but when the ON CLAUSE is defined in the query the KEY keyword is removed; otherwise, an EWI is inserted.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
OUTER-CROSS APPLY¶
Snowflake transforms the clause the CROSS APPLY into LEFT OUTER JOIN and OUTER APPLY to INNER JOIN.
Input Code:¶
Sybase¶
Output Code:¶
Snowflake¶
CONTAINS Clause¶
In Sybase the CONTAINS clause following a table name to filter the table and return only those rows matching the full text query specified with contains-query. Every matching row of the table is returned together with a score column that can be referred to using score-correlation-name. Snowflake does not support this behavior.