dbTalk Databases Forums  

Extracting data from XML within a field

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Extracting data from XML within a field in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger Peffers
 
Posts: n/a

Default Extracting data from XML within a field - 09-14-2009 , 05:54 AM






Hi All

Running ASA 9.0.2.3661, I have a situation where one of the fields
(varchar(4000)) with a table contains an xml string as shown below.

<ROOT><NEW_DATA sys_key="Audit_id" value_integer="1056"
value_decimal="" Value_DateTime="" value_string=""
value_desc="Integer: Next session ID of user in UAUDIT table"/></ROOT>

In my select statement I would like to extract the value_integer value
1056.

can someone help with the correct command?

Thanks

Roger

Reply With Quote
  #2  
Old   
Kory Hodgson (Sybase iAnywhere)
 
Posts: n/a

Default Re: Extracting data from XML within a field - 09-14-2009 , 09:07 AM






The OPENXML function might help, you should check out the docs related
to this function:
http://www.ianywhere.com/developer/p...9/00000243.htm

Roger Peffers wrote:
Quote:
Hi All

Running ASA 9.0.2.3661, I have a situation where one of the fields
(varchar(4000)) with a table contains an xml string as shown below.

ROOT><NEW_DATA sys_key="Audit_id" value_integer="1056"
value_decimal="" Value_DateTime="" value_string=""
value_desc="Integer: Next session ID of user in UAUDIT table"/></ROOT

In my select statement I would like to extract the value_integer value
1056.

can someone help with the correct command?

Thanks

Roger

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.