unresolved reference to object [INFORMATION_SCHEMA].[TABLES]

前端 未结 3 1230
醉梦人生
醉梦人生 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-29 00:06

    what Sam said is the best way for doing this.
    However, if you have a scenario that you need to deploy the dacpac from a machine that doesn't have that reference in that specific location, you may get into trouble. Another way is to open your .project file and make sure the following tag has the value of false for the build configuration you are trying to run.

    false
    

    This way you don't need to add a reference to your project.

提交回复
热议问题