0
我需要編寫一個子查詢,它不允許我繼續。什麼是錯誤的以及如何實現這個目標?MS SQL相關的子查詢,無法寫入外部查詢
錯誤:「A」附近語法不正確。
SELECT * FROM
(
SELECT ID,
CAST([dbo].[SC_GetVersionedFieldValue](ID, '{25BED78C-4957-4165-998A-CA1B52F67497}') AS NVARCHAR(MAX)) AS '__Created',
CAST([dbo].[SC_GetVersionedFieldValue](ID, '{D9CF14B1-FA16-4BA6-9288-E8A174D4D522}') AS NVARCHAR(MAX)) AS '__Updated'
FROM [dbo].[Items] WHERE [TemplateID] = '{8CB33CED-3E7E-4263-AF97-71B22338D9C7}'
) mytable A WHERE exists (SELECT ID FROM mytable B WHERE A.ID = B.ID) ;
@harsh +1您的查詢具有良好抓 –
''AS '__Updated',FROM' – harsh
@harsh鷹派眼中的錯誤! 1 – Hoh