I am working in ASA 11 with store procedures.
Example:
CREATE PROCEDURE "DBA"."pa_select_employ"(
@cod nVARCHAR(10),
@name nvarchar(15) OUTPUT)
BEGIN
SELECT @name=name_employ FROM EMPLOY //the line 6
WHERE COD_EMPLOY=@cod
END
Send the variable @cod and need result @name OUTPUT
Can't Save but shows message:
The procedure 'xxx' could not be modified in the database. Syntax error near '@name' on line 6 [Sybase][ODBC Driver][SQL Anywhere]Syntax error near '@name' on line 6 SQLCODE: -131 SQLSTATE: 42000
In the Interactive SQL the select is OK.
DECLARE @name varchar(15)
SELECT @name=name_employ FROM EMPLOY
WHERE COD_EMPLOY='333333'
please help me find the syntax error? (I speak Spanish.)