首先,我一直在尋找全國各地的答案,這一點,我也是新來的SQL編碼,所以請多多包涵。附近有語法錯誤「;」 (Microsoft SQL Server錯誤102)
我試圖發現客戶機在SCCM 2012r2與自定義報告當前的健康狀況,請參閱下面的代碼:
SELECT v_r_system.name0 AS 'Computer Name',
v_gs_antimalwarehealthstatus.lastquickscanage AS 'Days since last quick scan',
v_gs_antimalwarehealthstatus.lastfullscanage AS 'Days Since Last Full Scan',
v_gs_antimalwareinfectionstatus.computerstatus AS 'Current Status',
v_gs_antimalwareinfectionstatus.lastcleaneddectiontime AS 'Last Cleaned'
FROM v_gs_antimalwarehealthstatus
INNER JOIN v_gs_antimalwarehealthstatus
INNER JOIN v_r_system
ON v_gs_antimalwarehealthstatus.resourceid = v_r_system.resourceid
INNER JOIN v_gs_antimalwareinfectionstatus;
當我嘗試它Report Builder 3.0中我不斷收到以下錯誤:
我似乎無法找出問題所在,它的駕駛我瘋了...
無論如何,任何ÿ您可以同時做點我在正確的方向將是巨大的。
乾杯
P.
「連接」的「ON」子句在哪裏? –
'INNER JOIN v_gs_antimalwareinfectionstatus;' - 添加連接條件 – Backs
您的條款上錯過了一些內部聯接這裏:'INNER JOIN v_gs_antimalwarehealthstatus' 和'INNER JOIN v_gs_antimalwareinfectionstatus' – Jens