unresolved reference to object [INFORMATION_SCHEMA].[TABLES]

前端 未结 3 1226
醉梦人生
醉梦人生 2020-11-28 23:34

I\'ve created a UDF that accesses the [INFORMATION_SCHEMA].[TABLES] view:

CREATE FUNCTION [dbo].[CountTables]
(
    @name sysname
)
RETURNS INT
         


        
3条回答
  •  隐瞒了意图╮
    2020-11-28 23:54

    In our project, we already have a reference to master, but we had this issue. Here was the error we got:

    SQL71502: Procedure: [Schema].[StoredProc1] has an unresolved reference to object [Schema].[Table1].[Property1].
    

    To resolve the reference error, on the table sql file, right click properties and verify the BuildSettings are set to Build.

    Changing it build fixed it.

提交回复
热议问题