Group By with Multiple Fields

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • carrionk@yahoo.com

    #1

    Group By with Multiple Fields

    Hi,
    I have structure similar to the following table.

    Month Year Category Brand SubBrand Currency Amount
    Jan 2005 A 0001 UC USD 200
    Jan 2005 A 0001 UC USD 500

    My entire table has 35 Fields.
    What I need is a query which performs the next result:

    Month Year Category Brand SubBrand Currency Amount
    Jan 2005 A 0001 UC USD 500

    I have come up with this Query:

    Select Month,Year,Cate gory,Brand, SubBrand, Currency, SUM(Amount)
    GROUP BY
    Month,Year,Cate gory,Brand, SubBrand, Currency;

    But the result is not what should be expected... Searching over this
    Group I found that "GROUP BY" is limited to 10 fields.. Can it be
    affecting the result?

    Regards
    LC

Working...