DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: XML Extract

Threaded View

  1. #5
    Join Date
    Sep 2007
    Posts
    8
    Hrishy,
    I was able to use the SQL below to get my job done.

    Code:
    SELECT sdi.sdiDocxml.extract('//Site[3]/CountryCode/text()').getstringval() as countrycode,   
    sdi.sdiDocxml.extract('//Site[3]/CountryName/text()').getstringval() as countryname,   
    sdi.sdiDocxml.extract('//Site[3]/CustomerName/text()').getstringval() as customername,    
    sdi.sdiDocxml.extract('//Site[3]/CustomerNumber/text()').getstringval() as customernumber,    
    sdi.sdiDocxml.extract('//Site[3]/SiteNumber/text()').getstringval() as sitenumber,    
    sdi.sdiDocxml.extract('//Site[3]/SiteShortName/text()').getstringval() as siteshortname,    
    sdi.sdiDocxml.extract('//Site[3]/Address1/text()').getstringval() as address1,    
    sdi.sdiDocxml.extract('//Site[3]/Address2/text()').getstringval() as address2,    
    sdi.sdiDocxml.extract('//Site[3]/City/text()').getstringval() as city,    sdi.sdiDocxml.extract('//Site[3]/State/text()').getstringval() as state,    sdi.sdiDocxml.extract('//Site[3]/PostalCode/text()').getstringval() as postalcode,    
    sdi.sdiDocxml.extract('//Site[3]/Location/text()').getstringval() as sitelocation,    
    sdi.sdiDocxml.extract('//Site[3]/SitePhoneNumber/text()').getstringval() as sitephonenumber,    
    sdi.sdiDocxml.extract('//Site[3]/ContactName/text()').getstringval() as contactname,    
    sdi.sdiDocxml.extract('//Site[3]/Contactphone/text()').getstringval() as contactphone,    
    sdi.sdiDocxml.extract('//Site[3]/CSRCode/text()').getstringval() as csrcode,    sdi.sdiDocxml.extract('//Site[3]/CSRName/text()').getstringval() as csrname,    
    sdi.sdiDocxml.extract('//Site[3]/BranchCode/text()').getstringval() as branchcode,    
    sdi.sdiDocxml.extract('//Site[3]/TerritoryCode/text()').getstringval() as territorycode,   
     'IDaj2300101192285613' as requestid, 'IDaj2300101192285613_'||3 as sdiidentifierrow 
    FROM aradmin.sdi_xml_tab sdi 
    where sdiid = 'IDaj2300101192285613'
    Thanks,
    Arthur
    Last edited by hrishy; 10-17-2007 at 07:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width