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

  • Question

  • User-1738841732 posted

    WITH XMLNAMESPACES(DEFAULT 'http://schemas.datacontract.org/2004/07/myData.SharedData.ViewModels.MyData')

    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')

    Friday, August 7, 2020 10:12 PM

All replies

  • User1535942433 posted

    Hi mansooraabid,

    Accroding to your description,I don't understand your reqiurment clearly.What is the meanings of replacing THREE sp charaters in Name,Age column?

    Could you post some details or sample table,table data to us?It will help us to solve your problems.

    Best regards,

    Yijing Sun

    Monday, August 10, 2020 7:40 AM