ms access query ignoring duplicate results

ms access query ignoring duplicate results

am 23.10.2007 21:17:11 von pidoling

I am working on this query that includes two tables. the first
table(withpay) has detail information and the second table (txdata)
has the summary of data.

withpay (join) withpay
withpay txdata txdata txdata
EMPLOYEE_CUSTOMINT1 Pay Code Pay Amount Total Earnings Fit Amt ID
A05257 O/T
114.16 874.96 81.98 32
A05257 REG
380.4 874.96 81.98 32
A05257 REG
380.4 874.96 81.98 32

the problem is that the total earnings, fit amt, and id fields should
only be displayed once like so

withpay (join) withpay
withpay txdata txdata txdata
EMPLOYEE_CUSTOMINT1 Pay Code Pay Amount Total Earnings Fit Amt ID
A05257 O/T
114.16 874.96 81.98 32
A05257 REG
380.4
A05257 REG 380.4

How do I prevent the txdata table from duplicating, the table consist
of one line per employee, but since the join is the
employee_customint1, it wants to match up each line item on the
withpay table, which can have multiple lines for each employee.

Re: ms access query ignoring duplicate results

am 23.10.2007 22:23:41 von Rich P

Try typing this in a new query sql window (Query Design view, View menu
at the top, select Sql view)

Select Distinct * From [your query]


Rich

*** Sent via Developersdex http://www.developersdex.com ***

Re: ms access query ignoring duplicate results

am 24.10.2007 13:37:39 von Mansi Shah

Hi,

Try this..


Select distinct
employee_cutominit1,paycode,payamount,totalearnings,fitamt,i d from
tblwithpay


Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***