0

I created a function and granted select on [dba].[ufn_track_dailies] to public. The function shows up under table valued functions, but when I try to use it I get an error:

select [dba].[ufn_track_dailies]('Real Name','', '08-01-2015', '08-31-2015')
2
2

If this is for SQL Server (and maybe others as well?), then you cannot SELECT a TVF, you need to SELECT FROM a TVF ;-) And, you need to use those silly parenthesis when calling functions:

SELECT * FROM [dba].ufn_track_dailies();

If it were a scalar function, that would be:

SELECT [dba].ufn_track_dailies();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.