SELECT DISTINCT
c.AUF_NR AS JPO,
c.KUNR AS CustNo,
c.BESTELL_NR AS CustJPO,
c.KOPF_PROJEKT AS Project,
c.ERFASS_DAT AS OrdDate,
c.LIEFER_DAT AS DlvDate
FROM OPENQUERY (server,'
server.AUF_STAT a,
server.AUF_POS b,
server.AUF_KOPF c
WHERE
c.AUF_NR = 140281')
答案 0 :(得分:1)
您尝试传递给server
的查询未完成。它必须是一个正确的SQL查询,而不仅仅是最后一点。
答案 1 :(得分:1)
你可以写成:
SELECT *
FROM OPENQUERY (server,' select DISTINCT c.AUF_NR AS JPO,
c.KUNR AS CustNo,
c.BESTELL_NR AS CustJPO,
c.KOPF_PROJEKT AS Project,
c.ERFASS_DAT AS OrdDate,
c.LIEFER_DAT AS DlvDate
from
--server.AUF_STAT a,
--server.AUF_POS b,
server.AUF_KOPF c
WHERE
c.AUF_NR = 140281')