-1
我有一個鏈接服務器LinkedServer1
我想查詢使用連接表。如何在查詢LinkedServer時使用連接表
我的查詢示例:
SELECT dds.Invoice_Tb.Store_Number, dds.Invoice_Tb.Invoice_Number,
dds.Invoice_Detail_Tb.Invoice_Number AS Invoice
FROM [LinkedServer1].Database1.dds.Invoice_Tb INNER JOIN
[LinkedServer1].Database1.dds.Invoice_Detail_Tb ON
[LinkedServer1].Database1.dds.Invoice_Tb.Invoice_Number =
[LinkedServer1].Database1.dds.Invoice_Detail_Tb.Invoice_Number
此查詢,在執行時給我一個錯誤:
The multi-part identifier could not be bound for each of the above table references. It references each table and column listed above.
你如何正確使用表聯接與鏈接的服務器查詢數據?
你應該嘗試** **別名爲表 –
這工作就像一個魅力。你能提出一個答案,我會接受嗎?謝謝@IvanStarostin – Shmewnix
你可以upvote我的評論。已經有@ JassyJov的回答了。 –