I have a user defined function taking a UUID as a parameter and returning a
table
uniqueidentifier )
RETURNS TABLE AS
RETURN
select *
from Messages
of other stuff
I want to use this in the following way:
SELECT DeploymentID, ( select count(*) from
dbo.fnDeploymentGetAllInComing ( DeploymentID ) )
FROM Deployment
and I get this error:
'DeploymentID' is not a recognized OPTIMIZER LOCK HINTS option.
or another (syntax) error if I qualify the argument name:
Incorrect syntax near '.'
Is this kind of behavoir forbidden, although it's not a problem if I invoke
a (scalar) function on a column argument:
select value, dbo.fnSomeScalarFunction(value)
from table
Can anyone explain?