duplicate entry in unique index

Posted on 2014-07-16
Last Modified: 2014-07-16
Hi experts,
I have an unique index on following fields
Now users claim they need to make one patient as an exception since this is being used for multiple purposes, how is that possible?
Question by:bfuchs
    LVL 68

    Accepted Solution

    You can't without adding something to the key.

    You could add a tinyint column to the table and index -- which takes only one byte, and handles up to 256 total dups.  You can default it to 0, and when a dup is required for yet another "special case", you can set a different unique value for it or force the user to assign a unique value.
    LVL 2

    Author Comment

    Would that cause an overhead to the data entry process, meaning it would take longer in general to save records to the database, especially when creating mass scheduling records?
    LVL 68

    Expert Comment

    Nah.  A single, numeric byte that defaults to 0 would have no noticeable affect on that process whatsoever.
    LVL 2

    Author Closing Comment

    Thanks that was a quickie!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now