ben.oates
01-21-2009, 03:06 AM
Hi all,
I am trying to get an output from Access and I have never seen SQL that relates to what I am trying to do.
Basically, I have a table of information where each object is associated with two dates: Received and Completed.
I want an output that displays a count of received and a count of completed on a given day, but I have no idea how to go about it.
For example:
Item Received Completed
Item 1 12/01/2009 16/01/2009
Item 2 12/01/2009 15/01/2009
Item 3 13/01/2009 16/01/2009
Item 4 14/01/2009 17/01/2009
Would show
Date Received Completed
12/01/2009 2 0
13/01/2009 1 0
14/01/2009 1 0
15/01/2009 0 1
16/01/2009 0 2
17/01/2009 0 1
I tried a pivot table but that came out counting the number of items that had completed dates on the received date as received date was the only field setting the increment - i.e. in this case:
Date Received Completed
12/01/2009 2 2
13/01/2009 1 1
14/01/2009 1 1
Any suggestions, greatly appreciated.
I am trying to get an output from Access and I have never seen SQL that relates to what I am trying to do.
Basically, I have a table of information where each object is associated with two dates: Received and Completed.
I want an output that displays a count of received and a count of completed on a given day, but I have no idea how to go about it.
For example:
Item Received Completed
Item 1 12/01/2009 16/01/2009
Item 2 12/01/2009 15/01/2009
Item 3 13/01/2009 16/01/2009
Item 4 14/01/2009 17/01/2009
Would show
Date Received Completed
12/01/2009 2 0
13/01/2009 1 0
14/01/2009 1 0
15/01/2009 0 1
16/01/2009 0 2
17/01/2009 0 1
I tried a pivot table but that came out counting the number of items that had completed dates on the received date as received date was the only field setting the increment - i.e. in this case:
Date Received Completed
12/01/2009 2 2
13/01/2009 1 1
14/01/2009 1 1
Any suggestions, greatly appreciated.