preventing doubles to be entered, check for quite equal

  • I am writing a sp that checks automatically for doubles in a table, at least I am trying ...

    It is about person information and the fields that are checked are FirstName, SurName and DateOfBirth, the rest isn't important for the 'doublecheck'.

    I already check the litteral combinations (if eg a person with the same firstname an surname already exists, a warning message is displayed), but how can I check for doubles when a user makes a typing error?

    eg, the person 'John Walker' already exists and the user tries to add the person 'John Walkzr' or 'John Walke'. On this moment the warning message should also be displayed.

    How can I make this? A function that checks if two strings are 'quite' equal?

    thx

  • this is a long shot, but maybe SOUNDEX may help you (language dependent). Check BOL

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • great!

    espacially the DIFFERENCE function helped me! if difference is 3 or 4 then a warning message is displayed ...

     

    thx

  • You might want to use initials. What will you do if you do have 2 John Walkers with same DOB?

    P

     

  • When a double is about te be entered, the user gets a message box, warning him that a person with a specific name and dob already exists. The user can deny this 😉

    thx for your concern 😉

     

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

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