I have following function which returns Table .
create Function FN(@Str varchar(30)) returns @Names table(name varchar(25)) as begin while (
A TVF (table-valued function) is supposed to be SELECTed FROM. Try this:
select * from FN('myFunc')