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
  • What RDBMS are you using ??? Commented Sep 11, 2015 at 0:33
  • What error are you getting? Commented Sep 11, 2015 at 8:13

1 Answer 1

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 and acknowledge you have read our privacy policy.

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