Question : Extract data from XML using sql server 2005Question

Having difficulty to extract data from XML document How do I extract all the values (GC Bidding / Pre-Design) and value of "pi" attribute from tag?



GC Bidding
Pre-Designesc>





Answer : Extract data from XML using sql server 2005Question

declare @x xml
set @x = '

GC Bidding
Pre-Designc>

'

select t.c.value('.','varchar(50)'),
t.c.value('./@pi','varchar(50)')
from @x.nodes('/project-stage/title-code/stage-desc') t(c)
Random Solutions  
 
programming4us programming4us