Mike C (10/15/2007)
Something like this should do the trick, using [font="Courier New"]CROSS APPLY[/font]:[font="Courier New"]SELECT *
FROM Persons p
CROSS APPLY dbo.CalculateIncome(p.personid);[/font]
Thanks for your help guys!!! I tried all sorts of stuff and couldn't make it work, so I ended up transforming my table valued function into a scalar function...
I'm a bit curious though, if I use the statement you wrote I will retrieve each and every column from the function (remember the function returns a table variable with more than one column). So how should I specify the column name that I want to retrieve...
Like I said, I solved the issue. It's just curiosity. 😉
Thanks!
JarZe