Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report to compare two tables

Status
Not open for further replies.

vey99

Programmer
Aug 23, 2001
13
US
Hi,

I am having problems comparing data from two tables. System details: CR=8.5,DB=Oracle 7, Connection=ODBC.

My table structure is (PartDescription,PartNumber) for both tables. They are linked via PartDescription.

Sample Data Table-A
PartDescription ; PartNumber
----------------------------
Arm ; 1001
Bolt ; 2001
Bolt 2002

Sample Data Table-B
PartDescription ; PartNumber
----------------------------
Arm ; 1001
Bolt ; 9991
Bolt 9992

When I link them in a report, the comparison for "Arm" is ok, but for "Bolt", 4 rows are displayed:

Bolt ; 2001 ; 9991
Bolt ; 2001 ; 9992
Bolt ; 2002 ; 9991
Bolt ; 2002 ; 9992

But the result I need is:

Bolt ; 2001 ; 9991
Bolt ; 2002 ; 9992

Any way to avoid such duplication? Thanks.
 
Are there any other columns to help in the linking? It will show 4 rows because of 2 instances in each table the way you have it now.
 
Sorry, the link between the tables would be "PartDescription".

I think these sort of comparisons should be quite common (like a report showing the difference between two products with different parts). A clearer image of the final report:

PartDescription ; Model A ; Model B ; Comparison(formula)
Arm ; 1001 ; 1001 ; common
Bolt ; 2001 ; 9991 ; different
Bolt ; 2002 ; 9992 ; different
Tube ; 3001 ; - ; unique

So that we can see which parts are common, different, or unique to that model.


Hope you can help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top