Idmpc
Programmer
- Jun 25, 2008
- 16
Hey everyone
I know the title might have been confusing, but here's what I've been trying to do (and haven't been successful at all):
I have a MS Access 2003 database, and am using ADO Components to access its contents with my Delphi program (So it uses JET SQL).
In my database, I have the following fields (among others):
DateTime, APN
here's a example of some of the data:
DateTime APN
08/10/2008 05:06:07 - APN1
08/10/2008 07:08:09 - APN1
08/10/2008 07:07:07 - APN2
08/11/2008 10:10:10 - APN2
08/11/2008 10:10:10 - APN1
... ...
So what happens is that I have APN1 and APN2 repeating for different times. What I need is to be able to make a query that will return me how many times all APNs are repeating themselves on each day inside a specified interval.
For example, the query I need would result the following:
Date APN1 APN2
08/10/2008 2 2
08/11/2008 1 1
I know how to do it if I had to list only 2 columns, one for the date and the second one for a SINGLE APN, as I'd be using the aggregate function COUNT, and then group by date. But what I need is a different column for every APN found on the database, so I can easily export that result to Excel and generate graphics that have Date on the X Axis and every APN as a series on the Y axis.
Can anyone help me, please?
Thanks in advance!
I know the title might have been confusing, but here's what I've been trying to do (and haven't been successful at all):
I have a MS Access 2003 database, and am using ADO Components to access its contents with my Delphi program (So it uses JET SQL).
In my database, I have the following fields (among others):
DateTime, APN
here's a example of some of the data:
DateTime APN
08/10/2008 05:06:07 - APN1
08/10/2008 07:08:09 - APN1
08/10/2008 07:07:07 - APN2
08/11/2008 10:10:10 - APN2
08/11/2008 10:10:10 - APN1
... ...
So what happens is that I have APN1 and APN2 repeating for different times. What I need is to be able to make a query that will return me how many times all APNs are repeating themselves on each day inside a specified interval.
For example, the query I need would result the following:
Date APN1 APN2
08/10/2008 2 2
08/11/2008 1 1
I know how to do it if I had to list only 2 columns, one for the date and the second one for a SINGLE APN, as I'd be using the aggregate function COUNT, and then group by date. But what I need is a different column for every APN found on the database, so I can easily export that result to Excel and generate graphics that have Date on the X Axis and every APN as a series on the Y axis.
Can anyone help me, please?
Thanks in advance!