drop indexes

  •  

    hi guys, i'm trying to modify a clustered index defined on a table by adding more columns.

    however i get this error whenever i try to drop its' contraints.

    The constraint 'PK_Patient_Info' is being referenced by table 'Scheduled_Appointment', foreign key constraint 'FK_Scheduled_Appointment_Patient_Info'.

    using...

    alter

    table Patient_Info

    drop

    constraint PK_Patient_Info

    create

    unique clustered index PK_Patient_Info on Patient_Info(KPAIDS_NO,Docket_num)

    any help in solving this problem is greatly appreciated

    thx much!

  • You need to drop or disable the foreign key constraints on the related tables which reference the primary key of that table first. Then you should be able to do what you were trying to do. Check the table 'Scheduled_Appointment', if my guess is correct.

  • Please do NOT cross-post.  WE monitor all the boards all the time.

     

    Please continue the discussion on this board : http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=324&messageid=384251

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

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