I have a table valued function that returns a table. When I try to JOIN the table-valued function with another table I don\'t get any results, but when I copy t
JOIN
Your "ON" clause of the join is most likely incorrect. Perhaps a small typo like
JOIN x ON oID = odID
instead of
JOIN x ON oID = oID