Special charcters/XML

Database

Special charcters/XML

Hi Experts,

Need  ur suggestions in Updating XML string  present in table by first adding 2  column tags in it. for e.g

the Table has currently similar data like '<?xml version = '1.0'?><testdata><testItem id="test_Id"><!±ABC±XYZ1234»»></testItem><testItem id="test_Indicator"><!±XYZ±Y»»></testItem>'

we have to add some tags in the existing XML using the below update-->

here we need to first search for the   ': <?xml version = '1.0'?><testtData>'  in the value present in the XML_COL and then

replace it wiht the added tags XML like as below

UPDATE test_TAB

SET XML_COL = oreplace(XML_COL , ': <?xml version = '1.0'?><testtData>' ,

'<?xml version = '1.0'?><testdata><testItem id="test_Id"><!±ABC±XYZ1234»»></testItem><testItem id="test_Indicator"><!±XYZ±Y»»></testItem>');

But as there are some special charcters in the XML string like '?'  hence its prompting for the value in the sql assistant.

Pls suggest.

Cheers!

Nishant

Tags (2)
3 REPLIES

Re: Special charcters/XML

Are you facing the same in bteq in unix environment? or you can use Teradata admin tool, Query.

Cheers,

Raja

Re: Special charcters/XML

thanks Raja for the Reply.

but i dont have access to the Teradata admin tool.

I just have access to Unix/sql assitant. I tried in Sql assiatnt earlier not in unix.

Cheers!

Nishant

Re: Special charcters/XML

Hi Nishant,

Maybe this link will help you?

This link is form Dieter's


I work more in unix env :).

Cheers,

Raja