0

我现在有这个代码

SELECT JOB.JobID, A.adID, AR.ARNum
FROM dbo.vEvent AS E, dbo.[vAd] as A, dbo.[vAR] as AR, dbo.JOB_EVENT as JOB
INNER JOIN A ON A.eventID = E.eventID
INNER JOIN AR ON AR.eventID = A.eventID
INNER JOIN JOB ON JOB.EVENT_ID = E.eventID
WHERE year = '' AND season = '' AND month = ''

然而; 当我在 SQl 服务器中执行它时,我得到了这个错误。

Msg 208, Level 16, State 1, Line 1
Invalid object name 'A'.

我不明白,因为我所有的变量对我来说都是正确的。

任何帮助,将不胜感激。

4

1 回答 1

5

你要

SELECT JOB.JobID, A.adID, AR.ARNum
FROM dbo.vEvent AS E
INNER JOIN dbo.[vAd] as A ON A.eventID = E.eventID
INNER JOIN dbo.[vAR] as AR ON AR.eventID = A.eventID
INNER JOIN dbo.JOB_EVENT as JOB ON JOB.EVENT_ID = E.eventID
WHERE year = '' AND season = '' AND month = ''
于 2012-07-18T13:56:12.063 回答