473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

ms access query ignoring duplicate results

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.

Oct 23 '07 #1
2 2374
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 ***
Oct 23 '07 #2

Hi,

Try this..
Select distinct
employee_cutominit1,paycode,payamount,totalearning s,fitamt,id from
tblwithpay
Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 24 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
4
by: Orion | last post by:
Hi, This is kind of last minute, I have a day and a half left to figure this out. I'm working on a project using ms-sqlserver. We are creating a ticket sales system, as part of the system, I...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
3
by: skennd | last post by:
Here's my problem in exact replication: I have used the find duplicate query in Access, and the query determined the following duplicate values by the following query: In (SELECT FROM As...
9
by: lightning | last post by:
Hi all, I'm not very conversant with the vocabulary of Access, so please ask for clarification if necessary... I am trying to build a search form that allows combinations of search terms. For...
4
by: BeeMarie | last post by:
Hi, I've been trying to figure out this query for several days. I'm not that familiar with writing SQL statements, but in order to get the results I want, I think I need a subquery which requires...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
1
by: ZAVILA | last post by:
This is the SQL code for starters. SELECT DISTINCTROW .CYCLE_DATE, .SERIES_NBR, .SERVICER_NBR, .SERVICER_NAME, .SERVICER_LOAN_NBR, .LOAN_NBR, .INTERNAL_LOAN_ID, .ARCC_LOAN_NBR, .LIEN_STATUS_CODE,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.