<?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/"
		>
<channel>
	<title>Comments on: Query Which Tables are Partitioned</title>
	<atom:link href="http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/feed" rel="self" type="application/rss+xml" />
	<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned</link>
	<description>Tips and Articles on SQL Server</description>
	<lastBuildDate>Wed, 16 May 2012 18:08:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Praveen</title>
		<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/comment-page-1#comment-949</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Mon, 31 Oct 2011 18:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=299#comment-949</guid>
		<description>There queries are very useful.
Thank You.</description>
		<content:encoded><![CDATA[<p>There queries are very useful.<br />
Thank You.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivaylo Byalkov</title>
		<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/comment-page-1#comment-938</link>
		<dc:creator>Ivaylo Byalkov</dc:creator>
		<pubDate>Wed, 19 Oct 2011 10:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=299#comment-938</guid>
		<description>Thank you! Very useful queries.</description>
		<content:encoded><![CDATA[<p>Thank you! Very useful queries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Dieter</title>
		<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/comment-page-1#comment-853</link>
		<dc:creator>Derek Dieter</dc:creator>
		<pubDate>Fri, 16 Sep 2011 20:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=299#comment-853</guid>
		<description>Hi Jon,

This should work:

select c.name
from sys.partitions sp
JOIN sys.index_columns ic
ON ic.object_id = sp.object_id
JOIN sys.columns c 
ON c.OBJECT_ID = ic.OBJECT_ID AND c.column_id = ic.column_id
WHERE sp.object_id = object_id(&#039;PartitionedOrders&#039;)</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>This should work:</p>
<p>select c.name<br />
from sys.partitions sp<br />
JOIN sys.index_columns ic<br />
ON ic.object_id = sp.object_id<br />
JOIN sys.columns c<br />
ON c.OBJECT_ID = ic.OBJECT_ID AND c.column_id = ic.column_id<br />
WHERE sp.object_id = object_id(&#8216;PartitionedOrders&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/comment-page-1#comment-816</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Mon, 05 Sep 2011 09:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=299#comment-816</guid>
		<description>That&#039;s great. How do I find the column name that the table uses in the partition? i.e. where does sql server record that it is the DueDate column (see below) that is used by the partition schema.

create table PartitionedOrders
(
Id int not null identity(1,1),
DueDate DateTime not null,
) on YearPS(DueDate)</description>
		<content:encoded><![CDATA[<p>That&#8217;s great. How do I find the column name that the table uses in the partition? i.e. where does sql server record that it is the DueDate column (see below) that is used by the partition schema.</p>
<p>create table PartitionedOrders<br />
(<br />
Id int not null identity(1,1),<br />
DueDate DateTime not null,<br />
) on YearPS(DueDate)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shrikant Bang</title>
		<link>http://sqlserverplanet.com/maintenance/query-which-tables-are-partitioned/comment-page-1#comment-747</link>
		<dc:creator>Shrikant Bang</dc:creator>
		<pubDate>Wed, 10 Aug 2011 09:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=299#comment-747</guid>
		<description>Very useful information.
Thank You.</description>
		<content:encoded><![CDATA[<p>Very useful information.<br />
Thank You.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

