Results 1 to 2 of 2
  1. #1
    rlsublime is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2012
    Posts
    58

    GROUP BY sql Statement

    I have the following sql statement but when i add the group by portion to the entire statment it is giving me an error and not running. any idea what i am missing and what I could do to fix this.



    SELECT [IL-FM_HE].[FM/HE], [IL-FM_HE].NAME, [IL-FM_HE]. 2010, [IL-FM_HE].[2011], [IL-FM_HE].[2012]
    FROM [IL-FM_HE] GROUP BY "Bank of America Corporation" WHERE[IL-FM_HE].NAME="Bank Of America Corporation" And [IL-FM_HE].NAME="Countrywide Financial Corporation" And[IL-FM_HE].NAME="Merrill Lynch & Co Inc";

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    The syntax is way off. What is it you're trying to achieve? You'd have to group on one or more field names in the SELECT clause, not fixed text. The clause is out of place and I suspect you want "OR" instead of "AND in the WHERE clause.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-21-2012, 07:40 PM
  2. Group title carrying forward to next group
    By Amandasr12 in forum Reports
    Replies: 3
    Last Post: 06-06-2012, 02:13 PM
  3. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  4. Replies: 5
    Last Post: 11-29-2010, 08:16 AM
  5. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums