P
Purnima Sharma
I have created a join between two tables: tableA and tableB. Both the tables
are identical in structure. Table a lists the data for January and table B
lists the data for the whole year (previous). The tables are joined on loan#
and Order#. There is a possibility that TableB has multiple records for the
loan and Order number listed in TableA as shown below:
TableA:
Loan # Order# Amount(A) Fee type Invoice date
525263 N2500 $250.00 Escrow 1/15/06
TableB:
Loan # Order# Amount(B) Fee type Invoice date
525263 N2500 $250.00 Escrow 1/15/06
525263 N2500 $500.00 Title 2/15/05
525263 N2500 $50.00 Refinance 8/20/05
Result of join on Order # and Loan#:
Loan # Order# Amount(A) Amolunt(B) Fee type Invoice
date
525263 N2500 $250.00 $250.00 Escrow
1/15/06
525263 N2500 $250.00 $500.00 Title
2/15/06
525263 N2500 $250.00 $50.00 Refinance
8/20/05
My question is: I want amount(A) to be shown one time only, not three time
as it shows for matching records in tableB. It should show amount in the
first row only and blank in subsequent rows. One option would be to use Sum
on amount in tableB so that there can be only one matching row. I don't want
to use that option because I want to see fee type also. I have tried distinct
function, unique values but nothing gives the results I want. Can someone
help in this regard? thanks.
Purnima
are identical in structure. Table a lists the data for January and table B
lists the data for the whole year (previous). The tables are joined on loan#
and Order#. There is a possibility that TableB has multiple records for the
loan and Order number listed in TableA as shown below:
TableA:
Loan # Order# Amount(A) Fee type Invoice date
525263 N2500 $250.00 Escrow 1/15/06
TableB:
Loan # Order# Amount(B) Fee type Invoice date
525263 N2500 $250.00 Escrow 1/15/06
525263 N2500 $500.00 Title 2/15/05
525263 N2500 $50.00 Refinance 8/20/05
Result of join on Order # and Loan#:
Loan # Order# Amount(A) Amolunt(B) Fee type Invoice
date
525263 N2500 $250.00 $250.00 Escrow
1/15/06
525263 N2500 $250.00 $500.00 Title
2/15/06
525263 N2500 $250.00 $50.00 Refinance
8/20/05
My question is: I want amount(A) to be shown one time only, not three time
as it shows for matching records in tableB. It should show amount in the
first row only and blank in subsequent rows. One option would be to use Sum
on amount in tableB so that there can be only one matching row. I don't want
to use that option because I want to see fee type also. I have tried distinct
function, unique values but nothing gives the results I want. Can someone
help in this regard? thanks.
Purnima