Dear ReportDr00,
Lbass solution is truly better. But, when writing Union All statements it is important to know that the number of fields (and field type at each position) must match as only one column is returned for each of the two columns from the table. I would also suggest adding a text field, as shown below, to identify from which table a particular record is from
Select A.ClientFullName, A.SSN, 'Table A' as 'Table Org'
From Owner.TableA A
union all
Select B.ClientFullName, B.SSN, 'Table B' as 'Table Org'
From Owner.TableB B
The result of the above statement would be:
ClientFullName SSN Table Org
John Smith 111-22-3333 Table A
John Smith 111-22-3333 Table B
Jane Smith 111-22-4444 Table A
June Smith 111-22-5555 Table A
This will allow you to also check the table the record came from since I don't know if it is possible for you to have duplicates in either table.
regards,
ro
Rosemary Lieberman
rosemary-at-microflo.com,
Microflo provides expert consulting on MagicTSD and Crystal Reports.
You will get answers more quickly if you read this before posting: faq149-3762