Database Schema Ambiguous hint pointer

I just imported the database into a Visual Studio project using the Sql Server 2008 database project. After solving many of the problems highlighted by Visual Studio, I now left only 2 related to the hinting index. 2 warnings (with defiant statements)

SELECT a.FI, a.GD 
FROM [RME].[dbo].[BP_RN] a with(index(idx_GD))
WHERE GD.STWithin(@Geometry) = 1

SQL04151: Procedure: [dbo]. [sp_TNFRME] contains an unresolved object reference. Either the object does not exist or the link is ambiguous because it can refer to any of the following objects: [dbo]. [BP_RN]. [idx_GD] or [DBO]. [Idx_GD].

and

SELECT a.I
FROM [dbo].[N] a with(index(idx_G))
WHERE a.G.STIntersects(@Geometry) = 1

SQL04151: Procedure: [dbo]. [sp_DIOQE] contains an unresolved object reference. Either the object does not exist or the link is ambiguous because it can refer to any of the following objects: [dbo]. [idx_G] or [DBO]. [N]. [Idx_G].

, seperatly, , , , , -.

, , ?

+3
1

, Visual Studio 2010 Ultimate, , , index_id .

, 3 .

VS2010 Ultimate, , , .

index_id , , .

, , - .

index_id 384000 1 , .

3 :

  • TABLEPREFIX_SPATIAL384000_COLUMNNAME1
  • TABLEPREFIX_SPATIAL384001_COLUMNNAME2
  • TABLEPREFIX_SPATIAL384002_COLUMNNAME3

index_id .

, :

WITH(INDEX(TABLEPREFIX_SPATIAL384000_COLUMNNAME1))

:

WITH(INDEX(384000))

Visual studio , .

CAVEAT: , /, , . ,

, sql, :

WITH(INDEX([$(my_geographic_index_name)]))

, .

.

+1

Source: https://habr.com/ru/post/1794088/


All Articles