all groups > sql server programming > november 2007 >
You're in the

sql server programming

group:

Partition Existing Table


Partition Existing Table Bob
11/2/2007 10:02:02 AM
sql server programming:
SQL Server 2005

How can I :

check to see if an existing table is partioned?
if not, partition it preserving data within it

preferably using a transaction.

Re: Partition Existing Table sloan
11/2/2007 1:30:57 PM

First Question:

The table/properties window shows it.

Or

declare @tableName varchar(256)
select @tableName = 'Employee'
declare @returnValue int
select @returnValue = count(*)
from sys.partitions
where object_id = object_id(@tableName)

or a Select * From sys.partitions

Second question:??
I'm not sure.


[quoted text, click to view]

AddThis Social Bookmark Button