Results 1 to 3 of 3

Thread: Indexed fields

  1. #1
    Stephanie Guest

    Indexed fields

    I have a table with three fields that are marked as indexed fields with unique keys. I want
    to remove one of the fields. When I do this and hit the rebuild button -- I get an error, that
    there is a duplicate field, so it will not just let me remove the one field and leave the other
    two?? How can I get around this?

  2. #2
    richard Guest

    Indexed fields (reply)

    It sounds like there may be a table formating issue that needs to be taken into account. Post the table statistics and I'll have a look at it for you.


    ------------
    Stephanie at 6/22/00 11:31:22 PM

    I have a table with three fields that are marked as indexed fields with unique keys. I want
    to remove one of the fields. When I do this and hit the rebuild button -- I get an error, that
    there is a duplicate field, so it will not just let me remove the one field and leave the other
    two?? How can I get around this?

  3. #3
    Andy H Guest

    Indexed fields (reply)

    Stephanie

    I assume that the fields are all part of the same unique index and you wish to remove one. In this case, you are getting a failure because the combination of the data in the remaining 2 fields is no longer unique

    eg (a,b,c) => (a,b)
    (a,b,d) => (a,b)

    The only way around this is to rebuild the index as non-unique with the two fields required.
    You should also bear in mind though, that this may be a unique combination to enforce integrity within the data and you would then be removing the enforcement mechanism

    Hope this helps
    Andy H


    ------------
    Stephanie at 6/22/00 11:31:22 PM

    I have a table with three fields that are marked as indexed fields with unique keys. I want
    to remove one of the fields. When I do this and hit the rebuild button -- I get an error, that
    there is a duplicate field, so it will not just let me remove the one field and leave the other
    two?? How can I get around this?

Posting Permissions

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