Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieving xml data

Status
Not open for further replies.

aravindk

Programmer
May 8, 2003
43
US
Can someone help me understand how I can retrieve data from a xml data type? In this example below, I want to retrieve AddressNo & Area from the table. Sample code below.

I am using Sql server 2005. I need a select statement returns the values from the column. Any help that you can provide is greatly appreciated.



create table #temp2
(
trans xml not null
)

insert into #temp2
select '<Inspection xsi:schemaLocation="blah_blah_blah.xsd" xmlns="_Schema" xmlns:xsi="<Request><SchemaVersion>19.5</SchemaVersion></Request>
<LivingQuarters>
<AddressNo>1664</AddressNo>
<Area>849</Area>
</LivingQuarters>
</Inspection>'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top