Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    2

    Question Unanswered: Help with SQL case expression in query...

    Hello,

    I have an Access query using the SQL below:

    SELECT Month([TransEntryDate]) AS MonthListed, Sum(Transactions.ListingPrice) AS SumOfListingPrice
    FROM Transactions
    GROUP BY Month([TransEntryDate]);

    This returns the correct data grouped by month, but I would like the months to be named - not numbered. Example - I would like 1 to be "January" and 2 to be "February" etc... I believe I have to use a case expression, but cannot seem to formulate it properly - can anyone offer up a working statement?
    Your help is appreciated...
    Last edited by itbizman; 07-20-04 at 09:42.

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Hi,

    Select monthName(number) from tableA

    Thank You.
    Last edited by r123456; 07-20-04 at 10:02.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •