I have a function which returns a result set. Now I need to join the result
set with a table in a SELECT query. How can I do that?
This question led me to a feature of T-SQL which is APPLY. This comes in
two flavors. They are as follows:
1. Cross Apply
2. Outer Apply
Both are used to join with the result set returned by a function. Cross
apply works like an INNER JOIN and OUTER apply works like LEFT OUTER JOIN.
Friday, August 1, 2008
Joining with a result set returned from a UDF (CROSS AND OUTER APPLY)
Labels:
APPLY,
CROSS APPLY,
join,
OUTER APPLY,
result set,
SQL Server,
T-SQL,
UDF
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment