Sybase SQL Anywhere CALL statement allows you to execute a stored procedure, while you have to use EXEC statement in SQL Server. Note that EXEC does not allow specifying parentheses around procedure parameters.
Sybase SQL Anywhere:
-- Sample procedure CREATE PROCEDURE greetings(IN @name VARCHAR(30)) BEGIN SELECT 'Hello, ' + @name + '!' END; -- Execute the procedure CALL greetings('world'); # Hello, world!
SQL Server:
-- Sample procedure CREATE PROCEDURE greetings( @name VARCHAR(30)) AS BEGIN SET NOCOUNT ON; SELECT 'Hello, ' + @name + '!' END; GO -- Execute the procedure, () are not allowed EXEC greetings('world'); # Incorrect syntax near 'world'. -- Execute the procedure, () are not allowed EXEC greetings 'world'; # Hello, world!
For more information, see Sybase SQL Anywhere to SQL Server Migration.