DECLARE @PreSOMasterXML XML
DECLARE @SDA VARCHAR(100)
SET @PreSOMasterXML=N'<ProcessTaskRequest>
<ActionType>CloseByVariable</ActionType>
<CloseByVariableHandler>
<TemplateID>1239</TemplateID>
<IdentityByVaribles>
<DataVariable>
<Name>#DV_ApproveUserID#</Name>
<Value>cz52</Value>
</DataVariable>
<DataVariable>
<Name>#DV_SONumber#</Name>
<Value>20127720</Value>
</DataVariable>
</IdentityByVaribles>
</CloseByVariableHandler>
</ProcessTaskRequest>'
SET @SDA = @PreSOMasterXML.value('(/ProcessTaskRequest/ActionType/text())[1]',N'nchar(100)')
SELECT @SDA AS VARABLE
转载于:https://www.cnblogs.com/Wolfmanlq/p/3433335.html