Hello,
Does open query exist in sybase ? Or more generally, in sybase, what are the possible way to select among the result of a procedure (temporary tables, out params, others ??)
Hello,
Does open query exist in sybase ? Or more generally, in sybase, what are the possible way to select among the result of a procedure (temporary tables, out params, others ??)
You can specify output parameters for a stored procedure by adding the keyword "output" after the parameter in the "Create Procedure MyStoredProcedure..." command.
Temp Tables of course exist, local or Global.
T-SQL under Sybase IQ you can also select from a stored procedure so something like this, assume your procedure is called "MyStoredProcedure"
SELECT MyId from MyStoredProcedure()
Finally you can also create derived tables (at least it works in Sybase IQ) like this to join with your stored procedure results
SELECT t1.Name,t1.Address,t2.MyId FROM MyTable t1, (SELECT MyId FROM MyStoredProcedure()) t2 WHERE t1.MyId = t2.MyId