I want to replace THREE sp charaters in Name, Age column upon select.

Aug 7 2020 5:15 PM
WITH XMLNAMESPACES(DEFAULT 'http://schemas.datacontract.org/2004/07/myData.SharedData.ViewModels.MyData')
SELECT
x.inf.value('(Name)[1]','nvarchar(225)') as NAME,
x.inf.value('(Age)[1]','nvarchar(225)') as AGE,
x.inf.value('(Gender)[1]','nvarchar(225)') as GENDER

FROM MYTABLE as t cross apply (select cast(t.TEST_DATA as xml) as BOND_PAYLOAD) as ca
cross apply ca.TEST_DATA.nodes('/WarehouseBondMyDataModel') as x(inf) where t.EmpId in('07302018433486048145')

Answers (1)