-1
當我運行下面的查詢時,出現錯誤:無法綁定多部分標識符「employee.mail」。無法綁定多部分標識符。任何解決方案
UPDATE [dbstore].[dbo].[Employee]
SET employee.mail = empAD.mail
FROM [dbstore].[dbo].[Employee] AS employee,
(SELECT employeeID,
mail
FROM OPENROWSET ('ADSDSOObject',
'adsdatasource',
'select employeeID, mail
from ''LDAP://dc=domain,dc=comp,dc=local'''))AS empAD
WHERE employee.No COLLATE DATABASE_DEFAULT = empAD.employeeID COLLATE DATABASE_DEFAULT
OR employee.No COLLATE DATABASE_DEFAULT = Substring (empAD.employeeID, Charindex('-', empAD.employeeID) + 2, Len(empAD.employeeID)) COLLATE DATABASE_DEFAULT
任何解決方案?
您沒有提到員工那裏只是更新表設置郵件=將做的工作 – 2014-10-10 10:41:25