SELECT
New_accountid AS AccountId
FROM
BingMapsPlatform_MSCRM.dbo.FilteredAccount WITH (NOLOCK)
WHERE
new_islicensed = 1
AND new_accountid NOT IN (SELECT DISTINCT CONVERT(INT,New_AccountId)
FROM BingMapsPlatform_MSCRM.dbo.New_keydenylistExtensionBase WITH (NOLOCK)
WHERE New_AccountId IS NOT NULL)
我從此腳本中收到此錯誤。請幫幫我 。將nvarchar轉換爲int時出錯
ErrorMessage : State 1, Line 1
Conversion failed when converting the nvarchar value 'account 1' to data type int.
更改爲WHERE new_islicensed ='1'。更好的辦法是更新你的數據類型,比特tho – 2013-03-19 09:11:07
我試過這個,但我仍然得到相同的錯誤。任何其他解決方法 – 2013-03-19 09:25:04
看起來像您有一個無法轉換的列的值,並且該值爲'account 1'..請檢查列中的所有值都可以轉換爲整數。 – Mortalus 2013-03-19 09:33:51