Inner join using Stored Procedures

J

Jason V

Can I use stored procedures in INNER JOINs?

IE:
Alter Procedure sp_SQLProvDirInc

AS

SELECT dbo.tblSQL_Include_Criteria.IncludeProvOff

FROM dbo.tblSQL_Include_Criteria INNER JOIN dbo.sp_SQLProvCrit ON
dbo.tblSQL_Include_Criteria.SQLID = dbo.sp_SQLProvCrit.ID
 
V

Vadim Rapp

Hello Jason:
You wrote in conference microsoft.public.access.adp.sqlserver on Mon, 12
Jul 2004 13:33:58 -0700:

JV>> Can I use stored procedures in INNER JOINs?
JV> or can you do variables in views, too?

No to both.

Vadim
 
M

Malcolm Cook

As Vadim said, not, but, you could do that if instead of SPs you used
"table valued user defined function" (new to MS SQL in version ??) (that can
take parameters).
 
Top