troubleshooting Question

MS SQL Function Parameters - can these be outputs of another function without using temporary variables?

Avatar of Bird757
Bird757Flag for South Africa asked on
Microsoft SQL ServerMicrosoft DevelopmentMicrosoft SQL Server 2008SQL
6 Comments1 Solution297 ViewsLast Modified:
Select [VariableList] From [DB].[dbo].[func_A](J.[iVar], J.[dVar1], J.[dVar2])
OUTER APPLY (
Select J1.[iVar], J1.[dVar1], J1.[dVar2] From [DB].[dbo].[func_B](@VarP, @VarQ) J1
) AS J

I have a function that lists date ranges, and I want to use these ranges to restrict the output sets of another function.

The easy way is to loop through the output of func_B using a cursor (or place the output in a temporary table, and use a WHILE LOOP).

I was wondering if there is a way to join directly?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros