Home Forums Programming General T-SQL Experts - Can this SP be recoded to work as a UDF RE: T-SQL Experts - Can this SP be recoded to work as a UDF

  • OK, next question:

    I built a view to test using the above udf and this works:

    SELECT     mail, sn, givenname

    FROM         dbo.udf_GetEMpsBYManager('115898') udf_GetEMpsBYManager

    Now, I don't want to be hardcoding employeeid's so I wrote a scalar udf, udf_GetEmployeeID that takes a full or partial name and returns a 6 character employeeid. I tried to code that into the view, i.e.:

    SELECT     mail, sn, givenname

    FROM         dbo.udf_GetEMpsBYManager(dbo.GetEmployeeid('Schaefer'))udf_GetEMpsBYManager

    But I get an error message:

    Error in list of function arguments: '.' not recognized.

    Incomplete parameters list.

    Unable to parse query text.

    Can I call a scalar udf in the invocation of a table udf in a view?

    There's a good one for you, huh?