Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following fields in my database:
SKU Number, Date, Shift/Team, Finished Units, Defects

I need to create a query that sums the # of finished units and defects by
SKU Number, Date, and Shift/Team. The problem I have run into is that the
graveyard shift goes over multiple dates since it runs from 6pm-6am. How do
I sum the finished units and defects for a given shift when there will be
multiple results for a shift in a day and the shift goes over two dates. For
example:

SKU # Date Shift/Team Finished Units Defects
1 1/1/06 A Gyd 20 200
1 1/1/06 A Gyd 10 150
1 1/2/06 A Gyd 15 100
2 1/2/06 A Gyd 10 50
1 1/2/06 A Day 25 300
5 1/2/06 A Day 10 25
1 1/2/06 A Gyd 15 100

How would I ensure the query sums the first three lines, but doesn't include
the 7th line?
 
You need to add time with your date so you can distingush between the "A Gyd
" entries. Default your table with Now() to include time.
 
I have tried that but I still don't know how to get the query to sum all of
the entries for two different dates.
 
Try this --
Day shift Between [Enter start date]+0.25 And [Enter start date]+0.75
Grave shift Between [Enter start date]+0.750001 And [Enter start date]+1.25
 
Back
Top