>>I am trying to eliminate duplicate records on couple of tables that are linked by relationship. I have a parent table called arcperson and a child table called arcpinfo. both tables are linked by field call personid. In my parent table arcperson I have a couple of fields called lname (last name) and fname (first name). I what to find all duplicates of lastname+firstname and then if any of these name don't have any data in the child table arcpinfo, I want to delete that parent and child record. My problem is how can I find duplicate records on lname and fname and also see if any records or blank records exist in child table. Here is something I tried but didn't workout as far as finding duplicate names:
>>
>>
>>SET ORDER TO NAMES
>>SELECT lname, fname, count(*) as CntDups FROM arc_person GROUP BY 1 HAVING CntDups > 1 INTO CURSOR test
>>
>>
>>this gave me an error on grouping.
>>I'm not sure if I am on the right track. any help appreciated.
>>
>>thanks
>>Nick
>
>
>SELECT lname, fname, count(*) as CntDups FROM arc_person GROUP BY 1,2 HAVING CntDups > 1
>
thanks