September 29, 2005 at 8:15 am
Hai,
I have a table as follows
StatusDate | Company | Color | Count |
9/1/2005 | Honda | Red | 6 |
9/1/2005 | Honda | Black | 40 |
9/1/2005 | Toyota | Black | 20 |
9/2/2005 | Ford | Red | 22 |
9/2/2005 | Honda | Red | 19 |
9/3/2005 | Toyota | Red | 24 |
9/3/2005 | Honda | Red | 25 |
9/3/2005 | Honda | Black | 29 |
9/3/2005 | Ford | Black | 55 |
I need a report as follows
9/1/2005 | 9/2/2005 | 9/3/2005 | ||||
Company | Red | Black | Red | Black | Red | Black |
Honda | 6 | 40 | 19 | 0 | 25 | 29 |
Toyota | 0 | 20 | 0 | 0 | 24 | 0 |
Ford | 0 | 0 | 22 | 0 | 0 | 55 |
Is there any way to do with SQL statement? any help would be appriciated.
Thanks in advance.
September 29, 2005 at 8:36 am
You are asking for a report design, which SQL statement can't do from what I understand. You can write a SQL statement and SUM on the number field and GROPE BY the other fields. Then in Access report or other report format tools put your fields in heading or detail or footer sections and you will get the design/layout of the report you are looking for. SQL statement can't design a layout of a report as it's not meant to do that. It will supply underlying data and let you manupulate it, but not format a layout of a report, as far as I know.
September 29, 2005 at 9:01 am
Ok, I understand which you are saying, atleast can i generate a report as follows?
Company | Red 9/1/2005 | Black 9/1/2005 | Red 9/2/2005 | Black 9/2/2005 | Red 9/3/2005 | Black 9/3/2005 |
Honda | 6 | 40 | 19 | 0 | 25 | 29 |
Toyota | 0 | 20 | 0 | 0 | 24 | 0 |
Ford | 0 | 0 | 22 | 0 | 0 | 55 |
Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply