Quantcast
Channel: for xml path reverse??
Viewing all articles
Browse latest Browse all 9

for xml path reverse??

$
0
0
just started playing with xml datatype, and I'm running into a performance issue...

I have to query an xml column which was populated by a 'for xml path' statement, and get the values back into relational tables...

select
DeletedData
.value('(/row/ListingID)[1]','int')as ListingID,
DeletedData
.value('(/row/ListingTypeID)[1]','int')as ListingTypeID, DeletedData.value('(/row/EventID)[1]','int')as EventID,
DeletedData.value('(/row/UserID)[1]','uniqueidentifier')as
etc.......
............
............
where DeletedData.value('(/row/ListingID)[1]','int')  = x


Performance slows down considerably as the number of values  retreived in the select increases which is understandable since it looks like it traverses for every value... 

Is there a way to do a 'for xml path' reverse into a table variable without explicitly retreiving every value?

thanks.

Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images