Error 431 SQL71561:
Computed Column: [dbo].[ViewAlertFrequency].[BeginDate] contains an unresolved
reference to an object.
Either the object does not exist or the reference is ambiguous because it could
refer to any of the following objects:
[Lookup].[dbo].[AlertFrequency].[AlertFrequency]::[BeginDate]
or [Lookup].[dbo].[AlertFrequency].[BeginDate]
當前數據庫是Lookup,因此找到此對象時不應該有任何問題。這是從現有視圖導入的。看起來整個數據庫就是這樣。我不確定::語法是什麼。SQL71561錯誤 - 歧義參考
這裏是視圖:
CREATE VIEW [dbo].[ViewAlertFrequency]
AS
--###
--ViewAlertFrequency
--###
--###
--used by: eobResolve
--###
SELECT DISTINCT TOP 100
AlertFrequency.[ID] AS [ID],
AlertFrequency.Code AS Code,
AlertFrequency.[Name] AS [Name],
AlertFrequency.[Description] AS [Description],
AlertFrequency.[Rank] AS [Rank],
AlertFrequency.BeginDate AS BeginDate,
AlertFrequency.EndDate AS EndDate
FROM
Lookup.dbo.AlertFrequency AS AlertFrequency
ORDER BY
AlertFrequency.[Rank] ASC
GO
GRANT SELECT
ON OBJECT::[dbo].[ViewAlertFrequency] TO [eobResolve]
AS [dbo];
你見過[this](http://blogs.msdn.com/b/bahill/archive/2009/08/26/using-self-referencing-or-local-3-part-names.aspx) ? –
@IswantoSan我嘗試使用$(DatabaseName),但它仍然無法正常工作。我只是將3部分名稱更改爲2. –
[VS 2012數據庫項目「未解決的對象引用」錯誤]的可能重複(http://stackoverflow.com/questions/13373310/vs-2012-database-project-unresolved -reference-to-object-error) –