I'm creating a query for a someone who wants quantities summed by a weekly range and correspond to a week number. This person wants Access to do something that is a simple function on Excel.
I have no clue how to do this or if Access is even made to do something like this.
This is an example of what I have so far
My code is
This is what the guy wants. There are more part numbers and the data from the other parts must be in the same format in the same query.
I have no clue how to do this or if Access is even made to do something like this.
This is an example of what I have so far
P/N QTY Work Date WW (Work Week)
25COMP 1 6/11/2014 28
25COMP 2 6/20/2014 25
25COMP 2 7/9/2014 28
25COMP 3 6/20/2014 25
....And so on
My code is
Code:
SELECT dbo_JBKLG.JKPRT AS P/N, dbo_JOB.JBQOR AS QTY, CDate(Mid([JKDDT],5,2) & "/" & Right([JKDDT],2) & "/" & Left([JKDDT],4)) AS [Work Date], DatePart("ww",[Work Date]) AS [WW]
FROM dbo_JBKLG LEFT JOIN dbo_JOB ON dbo_JBKLG.JKJOB = dbo_JOB.JBJNO
GROUP BY dbo_JBKLG.JKPRT, dbo_JOB.JBQOR, CDate(Mid([JKDDT],5,2) & "/" & Right([JKDDT],2) & "/" & Left([JKDDT],4))
This is what the guy wants. There are more part numbers and the data from the other parts must be in the same format in the same query.
P/N QTY WK WW
25COMP 155 06/09-06/15 WW24
25COMP 227 06/16-06/22 WW25
25COMP 160 06/23-06/29 WW26
25COMP 200 06/30-07/06 WW27
.....And so on