<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>SQL Server CLR SharePoint Interface</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Project/ProjectRss.aspx</link><description>   This sample code demonstrates how to query a Microsoft Office SharePoint Server    2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.        With the growing popularity of Sh...</description><item><title>UPDATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008)</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Release/ProjectReleases.aspx?ReleaseId=547</link><description>Here&amp;#39;s the initial release of this sample.  Please send me feedback if you find it useful or find a problem.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas</description><author></author><pubDate>Mon, 04 Aug 2008 22:03:00 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008) 20080804P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=11</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt;&lt;pre&gt;
select * from dbo.GetListCollection('http://MySharePointSite');
&lt;/pre&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt;&lt;pre&gt;
with ListItems as
(
  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems
)
select 
    Item.value('@ows_Title', 'varchar(50)') Title, 
    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url
    ,Item.query('.') Item 
from ListItems cross apply ListItems.AllListItems.nodes('/*/*') Items(Item)
&lt;/pre&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)
&lt;/pre&gt;Please let me know if you find this sample useful, and use the Issue Tracker for any problems or changes you'd like to see.&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Wed, 23 Apr 2008 18:56:31 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080423P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=9</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt;&lt;pre&gt;
select * form dbo.GetListCollection('http://MySharePointSite');
&lt;/pre&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt;&lt;pre&gt;
with ListItems as
(
  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems
)
select 
    Item.value('@ows_Title', 'varchar(50)') Title, 
    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url
    ,Item.query('.') Item 
from ListItems cross apply ListItems.AllListItems.nodes('/*/*') Items(Item)
&lt;/pre&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)
&lt;/pre&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Sat, 01 Mar 2008 01:29:53 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080301A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt;{&amp;quot;&lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &amp;quot;}&lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Sat, 01 Mar 2008 01:27:11 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080301A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=10</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt;&lt;pre&gt;
select * form dbo.GetListCollection('http://MySharePointSite');
&lt;/pre&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt;&lt;pre&gt;
with ListItems as
(
  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems
)
select 
    Item.value('@ows_Title', 'varchar(50)') Title, 
    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url
    ,Item.query('.') Item 
from ListItems cross apply ListItems.AllListItems.nodes('/*/*') Items(Item)
&lt;/pre&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)
&lt;/pre&gt;Please let me know if you find this sample useful, and use the Issue Tracker for any problems or changes you'd like to see.&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 22:42:04 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt;&lt;pre&gt;
select * form dbo.GetListCollection('http://MySharePointSite');
&lt;/pre&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt;&lt;pre&gt;
with ListItems as
(
  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems
)
select 
    Item.value('@ows_Title', 'varchar(50)') Title, 
    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url
    ,Item.query('.') Item 
from ListItems cross apply ListItems.AllListItems.nodes('/*/*') Items(Item)
&lt;/pre&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 22:29:27 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt; &lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relavent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 18:23:32 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt; &lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relevent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 18:22:53 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229P</guid></item><item><title>UPDATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008)</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Release/ProjectReleases.aspx?ReleaseId=547</link><description>Here&amp;#39;s the initial release of this sample.  Please send me feedback if you find it useful or find a problem.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas</description><author></author><pubDate>Fri, 29 Feb 2008 00:57:26 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008) 20080229A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=4</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  The code here runs inside your SQL Server and accesses the SharePoint &lt;br /&gt;web service over HTTP, so you will need your DBA&amp;#39;s permission and perhaps assistence &lt;br /&gt;to get such a solution running.
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;The CLR code will, by default, run under the identity of the SQL Server service.  If&lt;br /&gt;you want the code to run using the credentials of the client who is connected to SQL&lt;br /&gt;Server instead there is a flag in the code you can change.&lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt; &lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relevent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David Baxter Browne&lt;br /&gt;Microsoft Technology Center - Dallas&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 00:57:06 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229A</guid></item><item><title>CREATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008)</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Release/ProjectReleases.aspx?ReleaseId=547</link><description>Here&amp;#39;s the initial release of this sample.  Please send me feedback if you find it useful or find a problem.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;David Browne&lt;br /&gt;Microsoft Technology Center - Dallas</description><author></author><pubDate>Fri, 29 Feb 2008 00:56:27 GMT</pubDate><guid isPermaLink="false">CREATED RELEASE: SqlClrSharePointInterface Sample Project zipped (Feb 28, 2008) 20080229A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  The code here runs inside your SQL Server and accesses the SharePoint &lt;br /&gt;web service over HTTP, so you will need your DBA&amp;#39;s permission and perhaps assistence &lt;br /&gt;to get such a solution running.
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;The CLR code will, by default, run under the identity of the SQL Server service.  If&lt;br /&gt;you want the code to run using the credentials of the client who is connected to SQL&lt;br /&gt;Server instead there is a flag in the code you can change.&lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt; &lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relevent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 00:53:28 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://code.msdn.microsoft.com/SqlClrSharePoint/Wiki/View.aspx?title=Home&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Resource Page Description&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This sample code demonstrates how to query a Microsoft Office SharePoint Server &lt;br /&gt;2007 or Windows SharePoint Services list from inside SQL Server 2005 or later.  &lt;br /&gt;&lt;br /&gt;With the growing popularity of SharePoint solutions, SharePoint lists are becoming&lt;br /&gt;an important source of enterprise data.  There is no OleDb provider for SharePoint,&lt;br /&gt;so integrating SharePoint data with data in SQL Server can be a challenge.&lt;br /&gt;&lt;br /&gt;This CLR User Defined Function shows how you can use the SQL Server&amp;#39;s Common &lt;br /&gt;Language Runtime integration to access SharePoint list data through the SharePoint&lt;br /&gt;web services.  The code here runs inside your SQL Server and accesses the SharePoint &lt;br /&gt;web service over HTTP, so you will need your DBA&amp;#39;s permission and perhaps assistence &lt;br /&gt;to get such a solution running.
&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;The CLR code will, by default, run under the identity of the SQL Server service.  If&lt;br /&gt;you want the code to run using the credentials of the client who is connected to SQL&lt;br /&gt;Server instead there is a flag in the code you can change.&lt;br /&gt; &lt;br /&gt;Here are some general references for SQL CLR and the SharePoint Web Services.&lt;br /&gt; &lt;br /&gt;SharePoint Lists Web Service&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa152619.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa152619.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Using CLR Integration in SQL Server 2005&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms345136.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms345136.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Creating CLR Functions&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189876.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189876.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;CREATE ASSEMBLY (Transact-SQL)&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms189524.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/ms189524.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For detailed instructions on building and installing this sample in SQL Server see the ReadMe.txt in the release.&lt;br /&gt; &lt;br /&gt;Then query SharePoint.  Something like&lt;br /&gt; &lt;br /&gt;select * form dbo.GetListCollection('http://MySharePointSite');&lt;br /&gt; &lt;br /&gt;To get the list of SharePoint Lists available.  Then retrieve the items for one of the lists.  &lt;br /&gt;the GetListItems function returns a single XML document containing all of the items.  So to &lt;br /&gt;make use of the data, you would typically use an XML-shreading query like this:&lt;br /&gt; &lt;br /&gt;with ListItems as&lt;br /&gt;(&lt;br /&gt;  select dbo.GetListItems('http://MySharePointSite','Site Collection Documents',null) AllListItems&lt;br /&gt;)&lt;br /&gt;select &lt;br /&gt;    Item.value('@ows_Title', 'varchar(50)') Title, &lt;br /&gt;    Item.value('@ows_EncodedAbsUrl','varchar(max)') Url&lt;br /&gt;    ,Item.query('.') Item &lt;br /&gt;from ListItems cross apply ListItems.AllListItems.nodes('/&lt;b&gt;/&lt;/b&gt;') Items(Item)&lt;br /&gt; &lt;br /&gt;There is also an example of a higher-performance solution that shreads the XML in CLR code&lt;br /&gt;and returns a relational result to SQL Server.  But you will need to customize the coding&lt;br /&gt;to return the fields that are relevent in your list.&lt;br /&gt; &lt;br /&gt;Select * from dbo.GetListItemsTable('http://MySharePointSite','Site Collection Documents',null)&lt;br /&gt; &lt;br /&gt;Please let me know if you find this sample useful,&lt;br /&gt; &lt;br /&gt;David&lt;br /&gt;
&lt;/div&gt;</description><author>dbrowne</author><pubDate>Fri, 29 Feb 2008 00:53:17 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080229A</guid></item></channel></rss>