Is it possible to do this
SELECT *
FROM xcu
JOIN fun_Blocked_Dates('2011-01-01', '2012-01-01', xcu.uid) bd ON bd.uid = xcu.uid
It seems that function Blocked_Dates is unable to accept xcu.uid as a valid parameter.
I get an error "Incorrect syntax near 'xcu'."
Perhaps this will work for you.
SELECT *
FROM xcu
CROSS APPLY fun_Blocked_Dates('2011-01-01', '2012-01-01', xcu.uid)
You can't use fields from tables as parameters to a function in a join. You need to use cross apply.
What you want is Cross Apply
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With