Cant make this Teradata Create procedure work

Database

Cant make this Teradata Create procedure work

Create Procedure StateAirportInventory

(

In Parm1 varchar(12)

)

Dynamic Result sets 1

Begin

Declare c Cursor With Return Only\

Select state, airname

From airport

where state = parm1

Order by airname desc

Open c;

End;

error: SPL1027:E(l7); Missing/Invalid SQL statement 'E(3707):Syntax error, expected something like a name or a Unicode delimited identifier between the 'Only' keyword and the end of the request.'.
1 REPLY
Junior Supporter

Re: Cant make this Teradata Create procedure work

Hi RodRicardIII,

There were just some minor changes

CREATE PROCEDURE StateAirportInventory

(

IN Parm1 VARCHAR(12)

)

DYNAMIC RESULT SETS 1

BEGIN

DECLARE c CURSOR WITH RETURN ONLY FOR

SELECT state, airname

FROM airport

WHERE state = Parm1

ORDER BY airname DESC;

OPEN c;

END;