Hello,
I'm using ASE 12.5 and trying to create the following stored procedure.
[blue]create proc proc1 @subj varchar(36), @exch varchar(36) as
select view_map_key, fhb_key, fhr_key from dpinst
where symbol = @subj
and exchange = @exch[/blue]
I have another application connecting to the database and will execute the procedure "proc1" by just using the procedure name (without exec, or execute).
The problem is it returns Error 12: Incorrect syntax near 'proc1'.
I've looked it up on Sybase website:
And one interesting line says "without exec or execute, is acceptable as long as the statement is the only one or the first one in a batch."
Any suggestions on how to call the store procedure by just using its name will be greately appreciated.
Thanks!!
Achit
I'm using ASE 12.5 and trying to create the following stored procedure.
[blue]create proc proc1 @subj varchar(36), @exch varchar(36) as
select view_map_key, fhb_key, fhr_key from dpinst
where symbol = @subj
and exchange = @exch[/blue]
I have another application connecting to the database and will execute the procedure "proc1" by just using the procedure name (without exec, or execute).
The problem is it returns Error 12: Incorrect syntax near 'proc1'.
I've looked it up on Sybase website:
And one interesting line says "without exec or execute, is acceptable as long as the statement is the only one or the first one in a batch."
Any suggestions on how to call the store procedure by just using its name will be greately appreciated.
Thanks!!
Achit