<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQLAuthority News &#8211; Guest Post &#8211; SELECT * FROM XML &#8211; Jacob Sebastian</title>
	<atom:link href="http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 21:45:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: suma</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-486346</link>
		<dc:creator><![CDATA[suma]]></dc:creator>
		<pubDate>Fri, 31 May 2013 14:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-486346</guid>
		<description><![CDATA[Hi Pinal,

I have a particular content to be searched in an attribute of an xml column where attribute might vary with different columns but content to be searched is same

suppose want to search vmqa1 content in an xml column where I m not sure of the attribute where it appears within the xml column

I searched a lot but did not get proper syntax for this]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I have a particular content to be searched in an attribute of an xml column where attribute might vary with different columns but content to be searched is same</p>
<p>suppose want to search vmqa1 content in an xml column where I m not sure of the attribute where it appears within the xml column</p>
<p>I searched a lot but did not get proper syntax for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prav</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-421370</link>
		<dc:creator><![CDATA[prav]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 13:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-421370</guid>
		<description><![CDATA[If node randomly change then how get the node value]]></description>
		<content:encoded><![CDATA[<p>If node randomly change then how get the node value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mahesh</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-409026</link>
		<dc:creator><![CDATA[mahesh]]></dc:creator>
		<pubDate>Thu, 17 Jan 2013 16:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-409026</guid>
		<description><![CDATA[Did you get a solution?]]></description>
		<content:encoded><![CDATA[<p>Did you get a solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Biju Sasidharan</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-297326</link>
		<dc:creator><![CDATA[Biju Sasidharan]]></dc:creator>
		<pubDate>Fri, 08 Jun 2012 09:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-297326</guid>
		<description><![CDATA[declare @tstTable table(txt xml)
insert @tstTable
select &#039;&lt;root&gt;
		  &lt;parent&gt;
			&lt;firstname&gt;X&lt;/firstname&gt;
			&lt;lastname&gt;Y&lt;/lastname&gt;
		  &lt;/parent&gt;
		  &lt;child&gt;
			&lt;firstname&gt;A&lt;/firstname&gt;
			&lt;lastname&gt;B&lt;/lastname&gt;
		  &lt;/child&gt;
		&lt;/root&gt;&#039;
select * from @tstTable
I need to get the output as following, i need to use the xml.Modify
I am expecting your reply.Plese help.
&lt;root&gt;
  &lt;parent&gt;
	&lt;fullname&gt;X Y&lt;/fullname&gt;
  &lt;/parent&gt;
  &lt;child&gt;
	&lt;fullname&gt;A B&lt;/fullname&gt;
  &lt;/child&gt;
&lt;/root&gt;]]></description>
		<content:encoded><![CDATA[<p>declare @tstTable table(txt xml)<br />
insert @tstTable<br />
select &#8216;&lt;root&gt;<br />
		  &lt;parent&gt;<br />
			&lt;firstname&gt;X&lt;/firstname&gt;<br />
			&lt;lastname&gt;Y&lt;/lastname&gt;<br />
		  &lt;/parent&gt;<br />
		  &lt;child&gt;<br />
			&lt;firstname&gt;A&lt;/firstname&gt;<br />
			&lt;lastname&gt;B&lt;/lastname&gt;<br />
		  &lt;/child&gt;<br />
		&lt;/root&gt;&#8217;<br />
select * from @tstTable<br />
I need to get the output as following, i need to use the xml.Modify<br />
I am expecting your reply.Plese help.<br />
&lt;root&gt;<br />
  &lt;parent&gt;<br />
	&lt;fullname&gt;X Y&lt;/fullname&gt;<br />
  &lt;/parent&gt;<br />
  &lt;child&gt;<br />
	&lt;fullname&gt;A B&lt;/fullname&gt;<br />
  &lt;/child&gt;<br />
&lt;/root&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Biju Sasidharan</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-297323</link>
		<dc:creator><![CDATA[Biju Sasidharan]]></dc:creator>
		<pubDate>Fri, 08 Jun 2012 09:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-297323</guid>
		<description><![CDATA[Hi Pinal,
Please see the query below,

declare @tstTable table(txt xml)
insert @tstTable
select &#039;
		  
			X
			Y
		  
		  
			A
			B
		  
		&#039;
select * from @tstTable

I need to get the output as following, i need to use the xml.Modify
I am expecting your reply.Plese help.


  
	X Y
  
  
	A B
  
]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
Please see the query below,</p>
<p>declare @tstTable table(txt xml)<br />
insert @tstTable<br />
select &#8216;</p>
<p>			X<br />
			Y</p>
<p>			A<br />
			B</p>
<p>		&#8216;<br />
select * from @tstTable</p>
<p>I need to get the output as following, i need to use the xml.Modify<br />
I am expecting your reply.Plese help.</p>
<p>	X Y</p>
<p>	A B</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Methods for Accessing SQL Server XML Datatype &#8211; Quiz &#8211; Puzzle &#8211; 20 of 31 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-241551</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Methods for Accessing SQL Server XML Datatype &#8211; Quiz &#8211; Puzzle &#8211; 20 of 31 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 21 Jan 2012 01:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-241551</guid>
		<description><![CDATA[[...] Server Interview Questions and Answers ISBN: 1466405643 Page#137-139 SELECT * FROM XML Shredding XML Validate an XML document in TSQL using XSD Simple Example of Reading XML File Using [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Server Interview Questions and Answers ISBN: 1466405643 Page#137-139 SELECT * FROM XML Shredding XML Validate an XML document in TSQL using XSD Simple Example of Reading XML File Using [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ~Shiv</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-149107</link>
		<dc:creator><![CDATA[~Shiv]]></dc:creator>
		<pubDate>Mon, 18 Jul 2011 09:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-149107</guid>
		<description><![CDATA[Very useful article Pinal :)]]></description>
		<content:encoded><![CDATA[<p>Very useful article Pinal :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Morrow</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-115082</link>
		<dc:creator><![CDATA[Todd Morrow]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 02:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-115082</guid>
		<description><![CDATA[my xml got chopped out of my sample code.

exec		sp_xml_preparedocument @idoc OUTPUT, 
&#039;&lt;Customer Name=&quot;Jones&quot; Phone=&quot;123&quot; /&gt;&#039;;

Also,
my result data has 2 columns and looks like this:

Attribute&#124;Value
Name	&#124;Jones
Phone	&#124;123

Sorry about the 2nd post.]]></description>
		<content:encoded><![CDATA[<p>my xml got chopped out of my sample code.</p>
<p>exec		sp_xml_preparedocument @idoc OUTPUT,<br />
&#8216;&lt;Customer Name=&#8221;Jones&#8221; Phone=&#8221;123&#8243; /&gt;&#8217;;</p>
<p>Also,<br />
my result data has 2 columns and looks like this:</p>
<p>Attribute|Value<br />
Name	|Jones<br />
Phone	|123</p>
<p>Sorry about the 2nd post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Morrow</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-115080</link>
		<dc:creator><![CDATA[Todd Morrow]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 02:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-115080</guid>
		<description><![CDATA[I&#039;m looking for 
SELECT * FROM @Xml
into one result row, one column per attribute,
with the attribute name as the column name,
and the attribute value as the value in the one row.

I&#039;m not there yet,
but this T-Sql:

declare	@idoc int
exec		sp_xml_preparedocument @idoc OUTPUT, 
&#039;&#039;;
WITH EdgeTable AS
(
	SELECT		*
	FROM		OPENXML (@idoc, &#039;/*&#039;)
)
SELECT e1.localname Attribute,
e2.text Value
FROM EdgeTable e1 join
EdgeTable e2 on e1.id = e2.parentid
where e2.localname = &#039;#text&#039;;
EXEC sp_xml_removedocument @idoc

returns this:

Attribute   Value
---------   -----
Name        Jones
Phone       123

And I don&#039;t know the schema.
I&#039;m trying to make a generic routine that can be run on any xml. All I want is the data.
I&#039;m trying to get it into one row though,
and so far, no luck.
Any help would be appreciated.
A solution not involving OPENXML would be better also.
I&#039;ll post if I solve it first.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m looking for<br />
SELECT * FROM @Xml<br />
into one result row, one column per attribute,<br />
with the attribute name as the column name,<br />
and the attribute value as the value in the one row.</p>
<p>I&#8217;m not there yet,<br />
but this T-Sql:</p>
<p>declare	@idoc int<br />
exec		sp_xml_preparedocument @idoc OUTPUT,<br />
&#8221;;<br />
WITH EdgeTable AS<br />
(<br />
	SELECT		*<br />
	FROM		OPENXML (@idoc, &#8216;/*&#8217;)<br />
)<br />
SELECT e1.localname Attribute,<br />
e2.text Value<br />
FROM EdgeTable e1 join<br />
EdgeTable e2 on e1.id = e2.parentid<br />
where e2.localname = &#8216;#text&#8217;;<br />
EXEC sp_xml_removedocument @idoc</p>
<p>returns this:</p>
<p>Attribute   Value<br />
&#8212;&#8212;&#8212;   &#8212;&#8211;<br />
Name        Jones<br />
Phone       123</p>
<p>And I don&#8217;t know the schema.<br />
I&#8217;m trying to make a generic routine that can be run on any xml. All I want is the data.<br />
I&#8217;m trying to get it into one row though,<br />
and so far, no luck.<br />
Any help would be appreciated.<br />
A solution not involving OPENXML would be better also.<br />
I&#8217;ll post if I solve it first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kimberly</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-95131</link>
		<dc:creator><![CDATA[Kimberly]]></dc:creator>
		<pubDate>Fri, 22 Oct 2010 18:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-95131</guid>
		<description><![CDATA[Very nicely written.  I&#039;m wonderin how the function can be modified to take namespaces into account?]]></description>
		<content:encoded><![CDATA[<p>Very nicely written.  I&#8217;m wonderin how the function can be modified to take namespaces into account?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-78221</link>
		<dc:creator><![CDATA[SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 30 Jun 2010 01:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-78221</guid>
		<description><![CDATA[[...] We also received couple of excellent guest blog posts as well. Imran Mohammed &#8211; SQL SERVER – Shrinking NDF and MDF Files – Readers’ Opinion and Jacob Sebastian SQLAuthority News – Guest Post – SELECT * FROM XML – Jacob Sebastian . [...]]]></description>
		<content:encoded><![CDATA[<p>[...] We also received couple of excellent guest blog posts as well. Imran Mohammed &#8211; SQL SERVER – Shrinking NDF and MDF Files – Readers’ Opinion and Jacob Sebastian SQLAuthority News – Guest Post – SELECT * FROM XML – Jacob Sebastian . [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-77533</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Thu, 24 Jun 2010 15:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-77533</guid>
		<description><![CDATA[Very nicely written, This really helps out with XPATH, one of the challenging things i have faced with XML is more of the mechanics of XPATH, this example makes it easier.]]></description>
		<content:encoded><![CDATA[<p>Very nicely written, This really helps out with XPATH, one of the challenging things i have faced with XML is more of the mechanics of XPATH, this example makes it easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun R</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-77357</link>
		<dc:creator><![CDATA[Varun R]]></dc:creator>
		<pubDate>Wed, 23 Jun 2010 05:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-77357</guid>
		<description><![CDATA[Very Nice article.........Pinal can u explain about the what are the diff types of Database Documentation,how it is useful? etc...and How a Start up firm implement these types of  documentation based on Agile model.I am Expecting an Interesting Article from you.........]]></description>
		<content:encoded><![CDATA[<p>Very Nice article&#8230;&#8230;&#8230;Pinal can u explain about the what are the diff types of Database Documentation,how it is useful? etc&#8230;and How a Start up firm implement these types of  documentation based on Agile model.I am Expecting an Interesting Article from you&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virat Kothari</title>
		<link>http://blog.sqlauthority.com/2010/06/23/sqlauthority-news-guest-post-select-from-xml-jacob-sebastian/#comment-77354</link>
		<dc:creator><![CDATA[Virat Kothari]]></dc:creator>
		<pubDate>Wed, 23 Jun 2010 04:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9334#comment-77354</guid>
		<description><![CDATA[Very nice article. I was always scared using XML. But, after reading this, I think it is very easy and handy. Thanks for sharing such a nice thing.]]></description>
		<content:encoded><![CDATA[<p>Very nice article. I was always scared using XML. But, after reading this, I think it is very easy and handy. Thanks for sharing such a nice thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
