We have database project.
In this projct we have user-defined aggregate function with property [Microsoft.SqlServer.Server.SqlUserDefinedAggregate].
Function name is "SumStr".
When we use this function in SQL procedure in "PIVOT" statment, building the database project is:
- success whithout warnings and errors for SQL-procedure;
- success whith warning for SQL-scalar-function: "Warning 1 SQL71502: Function: [dbo].[DatabaseScalarFunction1] has an unresolved reference to object [dbo].[SumStr]."
- building whith error for SQL-view or inline-functions: "SQL71501: View: [dbo].[View1] has an unresolved reference to object [dbo].[SumStr]."
But! when we use this compiled function on SQL server side - all queries in view or table-valued functions who use this function, are performed without error.