![]() ![]()
|
Conversion of Assignment Statement from Microsoft SQL Server to Oracle
SQL Server SELECT | SET @local_variable assignment statements allow specifying a subquery to assign a value to a variable, while the Oracle assignment operator (:=) does not allow specifying a subquery.
a) Expression is any expression, except a scalar subquery.
In this case SQLWays converts the SELECT and SET clause to the Oracle assignment operator (:=).
Examples:
TABLE 19. Expression is any expression, except a scalar subquery Microsoft SQL Server OracleSELECT @A=5+7
v_A:=5+7;
SET @B='String'
v_B:='String';
b) Expression is a scalar subquery.
If SQL Server expression is a scalar subquery, SQLWays converts the SELECT and SET clause to the Oracle SELECT INTO statement that allows assigning a SQL query result to a variable.
Examples:
c) SELECT | SET containing several assignment clauses.
The SQL Server SELECT @local_variable assignment statement can contain several assignments while Oracle allows only one assignment. If SQL Server SELECT contains multiple assignments, SQLWays converts them to multiple assignment operators in Oracle.
Examples:
|
Ispirer Systems http://www.ispirer.com ispirer@ispirer.com |
![]() ![]()
|