1
我更新表通過XML文件,但是當我執行的SQL代碼扔了這個錯誤: -多部分標識符不能被綁定。[4104]
這裏是我的代碼
IF(@PreppedUpdateModelXml is NULL OR @PreppedUpdateModelXml.exist('*') = 0)
BEGIN
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @PID OUTPUT,@PreppedUpdateModelXml
UPDATE EquipmentModel
SET [Category] = em.[Category]
SELECT * FROM OPENXML (@PID, '/Root/NewDataSet',2)
WITH ([Category] VARCHAR(50), [ModelID] INT) AS em
WHERE EquipmentModel.ModelID = em.ModelID
END