473,383 Members | 1,862 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,383 software developers and data experts.

Problem with defining criteria in query

I have a query which takes data from 3 tables: Errors, Employees on
work stations, Employees. In our company we have a production line and
every employee has one-week assignment- e.g. on station AM, then
another week on station AN etc. Query connects errors with employees
and we have a briefly view on the situation. I used the function DMax
to have less work with assignments- we want to do it every Monday for
a whole week. But when i have different dates in fields 'Dates' from
table 'Employees on ...' the query shows only errors with the last
date, not the everyone. Do somebody know how can i define the criteria
for every employee- so the function DMax will find the last date for
every employee's ID not the last date in the whole table?
Jun 27 '08 #1
1 1069
Sounds like you may want to create a subquery on the Errors table that
groups by Employee and selects the max date - either overall, or
within a specific period (which is my hunch as the better choice).

Use that query to join back to the other tables to show the required
data.

Best I can offer with the information given.

Tim Mills-Groninger

On May 12, 3:10*am, dari...@gmail.com wrote:
I have a query which takes data from 3 tables: Errors, Employees on
work stations, Employees. In our company we have a production line and
every employee has one-week assignment- e.g. on station AM, then
another week on station AN etc. Query connects errors with employees
and we have a briefly view on the situation. I used the function DMax
to have less work with assignments- we want to do it every Monday for
a whole week. But when i have different dates in fields 'Dates' from
table 'Employees on ...' the query shows only errors with the last
date, not the everyone. Do somebody know how can i define the criteria
for every employee- so the function DMax will find the last date for
every employee's ID not the last date in the whole table?
Jun 27 '08 #2

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

Similar topics

2
by: mike | last post by:
ok here's the problem: I have a page that displays a form for user to select individual fields and to specify their own criteria which is used to query a database and then create an excel...
14
by: signaturefactory | last post by:
I am trying the following query in and oleDbCommand: SELECT PartLocations.LocationName, Sum(PartsJournal.Quantity) AS SumOfQuantity, PartsJournal.PartsLotNumber FROM PartLocations INNER JOIN...
2
by: JJA | last post by:
Please advise on how to get the GROUP BY coded in an acceptable way: DECLARE @LO INT DECLARE @HI INT DECLARE @StartDate varchar(10) DECLARE @EndDate varchar(10) SELECT @StartDate =...
6
by: HKM | last post by:
Hello, I have a query engine that builds the SQL Query to obtain the recordSet. Following is an Exmaple Query that my QueryBuilder outputted SELECT * FROM BookInfo WHERE BookName LIKE...
1
by: Tero Partanen | last post by:
Hi, I have a small problem with MS ACCESS query. I want to be able to have a field, where I can input the search parameter, and then it will show me all the entires that match the parameter....
3
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
3
by: Andy_Khosravi | last post by:
I have been trying to build a user friendly search engine for a small database I have created. I'm having some particular problems with one of my date fields. Here's the setup: I'm using...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
41
by: nik707 | last post by:
Hello all, First of all my name is Shan and I am currently learning and also designing a database in Access. Your forum users seems to be very helpful and experts in this matter so I thought I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.