All Forums Database
07 Jan 2014
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
 
 

Raja_KT 1246 posts Joined 07/09
07 Jan 2014

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

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

07 Jan 2014

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

Raja_KT 1246 posts Joined 07/09
07 Jan 2014

Hi Nishant,

 

Maybe this link will help you?

This link is form Dieter's

http://forums.teradata.com/forum/database/issue-in-loading-as-first-character-in-the-field

 

I work more in unix env :).

 

Cheers,

Raja

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.