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?