Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Sunnyvale, CA USA

    Unanswered: Moving a heap to a Partition Function

    I have a table in the PRIMARY filegroup which doesn't have any PK, indexes, or constraints defined.
    I want to change it to use a date-based Partition Function, and I'll probably add a clustered PK at the same time.

    However, the only command I can find to change the table storage information is:-

    WITH (MOVE TO DatePScheme(mydatefield))

    Unfortunately the current table doesn't have a constraint to drop!
    Do I really have to create a constraint just so I can drop it?

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    add the primary using ADD CONSTRAINT and specify the filegroup you want to move to.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts