Partitioned table

  • Hi all,

    I have an table that have too columns:

    TransactionID: Identity, primary key

    TransDate: Transaction date

    I want to create partitioned table divided by TransDate but when i insert to partition view SQL show an error:

    UNION ALL view 'AA' is not updatable because a partitioning column was not found.

    Anybody help me please!!

     

    thanks

  • The partitioning column must be part of PK. Since you partinition the table by TransDate, TransDate becomes the partition column. But it's not part of PK. So you cannot update it.

    In fact the partitioning column must be the first column in the PK definition.

  • Thank peterhe,

    I want to set combined primary key for 2 columns:TransactionID,TransDate

    but when i insert to partition view SQL still raise an error as before.

    What can i do to solve that???

     

     

  • TransDate should be the first column in the PK.

    And there are lots of other constraints on the partitioned table and column. Please check BOL for details: "Updatable Partitioned Views" under "Creating a Partitioned View" topic.

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply