> !|Query|EXEC dbo.MyFct @arg|
> |col1|col2|
> |200 |300 |
Hello Ioani. The syntax that you are using is for Stored Procedures,
not User-Defined Functions. For functions, you can either do a SELECT
FuncName if it is a scalar-valued function or you can do a SELECT *
FROM FuncName if it is a table-valued function (since it acts like a
table). Also, for functions you need to put parameters in
parenthesis. So, try the following:
SELECT col1, col2 FROM dbo.MyFct(@arg)
Hope that helps. Take care, Solomon..