SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Finding Bad data - Same person with same address / phone entered incorrect


Finding Bad data - Same person with same address / phone entered incorrect

Author
Message
lsalih
lsalih
SSC-Addicted
SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)

Group: General Forum Members
Points: 492 Visits: 1051
Problem:
Person tbl holds personal information for everyone (patient, and emergency contacts).Due to bad data entry, we have some people name misspelled under the person tbl who are either husband or wife (relationship type W or H) to the patient. To resolve the issue 1) We need to identify if the person is listed more than one time, and who are related to the same patient with same relation type (Wife or husband) and has same phone to find the names which are misspelled.
For example, I have person name first name Lina and Linda entered twice, she has relationtype = W to patient 1, and also she got same phones listed in phone tbl. We want to list both records of Lina and Linda who is wife of patient 1 and her phone is the same in phone tbl. That way we identify that Linda name was typed incorrectly.

Below is the schema, I am also attaching same data as well.
Person_Info: PersonID, Person Info contains everyone (patient, vistor, Emergecy contact) First and last names
Patien_Info: PatientID, table contains patient ID and other information
Patient_PersonRelation: Person_ID, patientID, relation
Adress: Contains address of all person and patient (key PersonID)
Phone: Contains phone # of everyone (key is personID)



Attachments
Schema_test.txt (7 views, 12.00 KB)
lsalih
lsalih
SSC-Addicted
SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)SSC-Addicted (492 reputation)

Group: General Forum Members
Points: 492 Visits: 1051
Please disregard my topic - I meant same person with name typo... I tried to edit the topic, but I was not successful.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search