I have a function that has a parameter varchar
.
I want to call the function and pass select result to function like
Select * from dbo.myfunc(select name from users)
But I get this ERROR:
Incorrect syntax near ')'
What can I do?
I have a function that has a parameter varchar
.
I want to call the function and pass select result to function like
Select * from dbo.myfunc(select name from users)
But I get this ERROR:
Incorrect syntax near ')'
What can I do?
Maybe like this:
select dbo.myfunc(name) from users
Use apply
:
Select f.*
from users u cross apply
dbo.myfunc(u.name) as f;