If this is for SQL Server (and maybe others as well?), then you cannot `SELECT` a TVF, you need to `SELECT` _FROM_ a TVF ;-) <!-- language-all: lang-sql --> SELECT * FROM [dba].ufn_track_dailies; If it were a scalar function, that would be: SELECT [dba].ufn_track_dailies;