Table of ContentsPreviousNext

Database Migration


Conversion of Sybase Adaptive Server Anyware CALL to Microsoft SQL Server

The Sybase Adaptive Server Anyware CALL statement is used to invoke a procedure that has been previously created. Sybase Adaptive Server Anyware CALL allow specifying expressions in the argument list.

The EXECUTE statement is used to invoke procedures in Microsoft SQL Server. Microsoft SQL Server EXECUTE allows specifying only constants or variables (not expressions) in the argument list.

SQLWays converts Sybase ASA CALL to the Microsoft SQL Server EXECUTE statement. For each expression in CALL, SQLWays creates a local variable, assigns the expression to the variables, and use this variable in the EXECUTE statement.

TABLE 29. Example of the conversion
Sybase Adaptive Server Anyware
Microsoft SQL Server
create procedure asa_sp_call (@a int)
begin
call sp_func('MTN' + ':' + 'FTN',@a+3);
end;
create procedure asa_sp_call @a INT
AS begin
DECLARE @par01 CHAR(10)
DECLARE @par02 INT
set @par01 = 'MTN' + ':' + 'FTN'
set @par02 = @a + 3
EXECUTE sp_func @par01, @par02
end


Ispirer Systems
http://www.ispirer.com
ispirer@ispirer.com
Table of ContentsPreviousNext