SQL Statement

  • Hai,

    I have a table as follows

    StatusDateCompanyColorCount
    9/1/2005HondaRed6
    9/1/2005HondaBlack40
    9/1/2005ToyotaBlack20
    9/2/2005FordRed22
    9/2/2005HondaRed19
    9/3/2005ToyotaRed24
    9/3/2005HondaRed25
    9/3/2005HondaBlack29
    9/3/2005FordBlack55

    I need a report as follows

     9/1/20059/2/20059/3/2005
    CompanyRedBlackRedBlackRedBlack
    Honda6401902529
    Toyota02000240
    Ford00220055

     

    Is there any way to do with SQL statement? any help would be appriciated.

    Thanks in advance.

     

     

  • 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.

  • Ok, I understand which you are saying, atleast can i generate a report as follows?

    CompanyRed 9/1/2005Black 9/1/2005Red 9/2/2005Black 9/2/2005Red 9/3/2005Black 9/3/2005
    Honda6401902529
    Toyota02000240
    Ford00220055

     

    Thanks.

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply