View

SQL 數據庫 ODBC 連接 多部分標識符無法綁定

  • October 6, 2015

我們正在使用 PADS Professional xDX Designer(來自 MentorGraphics)和一個 SQL 零件數據庫,該數據庫通過 ODBC 使用視圖連接。一切似乎都工作得很好,除了我們的電感器部分,不知何故我在分配 Sat 時遇到錯誤。電流到零件。

我收到以下錯誤:

An ODBC error occurred:
The multi-part identifier "Sat. Current" could not be bound.
The multi-part identifier "Sat. Current" could not be bound.
Statement(s) could not be prepared.
State:37000 Native:4104,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
State:37000 Native:4104,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
State:37000 Native:8180,Origin:[Microsoft[ODBC SQL Server Driver][SQL Server]
(1400)

用於創建視圖的我的 SQL 查詢:

--DROP view _ARV_Inductor
--CREATE VIEW _ARV_Inductor AS
SELECT [Number] as [Part Number],
[Description],
CONVERT(float,[Value]) as [Value],
[Case],
[Variant_Member] as [Variant],
CONVERT(float,[Rdc]) as [Rdc],
CONVERT(float,[Tolerance]) as [Tolerance],
CONVERT(float,[Nom. Current]) as [Nom. Current],
CONVERT(float,[Sat. Current]) as [Sat. Current],
[Temp Min],
[Temp Max],
[Datasheet],
[CostPerUnit] as Price,
[Manufacturer_member] as [Manufacturer],
[Part name],
[RS],
[Farnell],
[Supplier_member] as [Supplier],
[Order code],
[Location]
FROM [PDXpertDB].[viewer].[SourceItemMasterView] where ([Type]='Inductor' AND [ShowInDX]='true')

所有其他屬性都正確分配,當我在 SQL Server Management Studio 中使用此視圖時,我也沒有收到任何錯誤,並且它顯示了正確的列表。

有什麼建議我可能做錯了嗎?它甚至是我的 SQL 部分的錯誤,還是與 xDX 設計器有關?

我會檢查您是否在 DSN 中設置了“引用標識符”,它看起來像它的解釋

$$ Sat. Current $$作為列$$ Current $$在表中$$ Sat $$

引用自:https://dba.stackexchange.com/questions/117126