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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Joining Stored Procedures

Status
Not open for further replies.

SBpsc

MIS
Dec 1, 2004
50
CA
Hi:

I am new to stored procedures so I am hoping someone can point me in the right direction...

My original query looks something like:

(SELECT * FROM db)
[tab]AS tb1

INNER JOIN

(SELECT tb2.a, tb2.b FROM db WHERE tb2.b='xyz')
[tab]AS tb2 ON tb1.a = tb2.a

Using stored procedures, I changed the query to look like:

(SELECT * FROM db)
[tab]AS tb1

INNER JOIN

(SomeProc(xyz))
[tab]AS tb2 ON tb1.a = tb2.a

The stored procedure works fine by itself when I call it but I can't get it to work when I want to join it to some other query. Can I not join on a stored procedure? What am I doing wrong?

Thanks in advance.
- SB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top