Table of ContentsPreviousNext

Ispirer             Ispirer


Ispirer SQLWays Database Migration Software

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 40. 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 


Table of ContentsPreviousNext
Ispirer             Ispirer
Copyright © 1999-2015 Ispirer Systems Ltd. Ispirer and SQLWays are trademarks of Ispirer Systems Ltd. All other product names may be trademarks of the respective companies. All rights reserved.