Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call stored procedures by name?

Status
Not open for further replies.

achit

Technical User
May 23, 2003
8
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top