Nesting Stored Procedures?

Nesting Stored Procedures?

Post by Jeff Frkonj » Thu, 25 Nov 1999 04:00:00



I need to JOIN the results of two subqueries.  In Access, it's done like
this:

SELECT query1.rowNameA, query2.rowNameZ
FROM query1 LEFT JOIN query2
ON (query1.id_option = query2.id_option) AND (query1.id_question =
query2.id_question);

I have packaged query1 and query2 as SQL stored procs.  How can I make a
third stored proc that does the join?

Thanks.

 
 
 

Nesting Stored Procedures?

Post by BPMargoli » Thu, 25 Nov 1999 04:00:00


Jeff,

Package the queries as views instead.

The equivalent of an Access query is NOT a stored procedure. The equivalent
of an Access query is a view.


Quote:> I need to JOIN the results of two subqueries.  In Access, it's done like
> this:

> SELECT query1.rowNameA, query2.rowNameZ
> FROM query1 LEFT JOIN query2
> ON (query1.id_option = query2.id_option) AND (query1.id_question =
> query2.id_question);

> I have packaged query1 and query2 as SQL stored procs.  How can I make a
> third stored proc that does the join?

> Thanks.