Results 1 to 2 of 2
  1. #1
    jscriptor09 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    60

    query SQL error

    Hi folks



    Any idea what is wrong with this sql statement?

    "SELECT MAX('CountOfThroughPutDate_FW') AS theCount FROM (SELECT ThroughPutTable_Generic.ThroughPutDate_FW, Count(ThroughPutTable_Generic.ThroughPutDate_FW) AS CountOfThroughPutDate_FW FROM ThroughPutTable_Generic GROUP BY ThroughPutTable_Generic.ThroughPutDate_FW
    "

    Access complains about the first FROM.

    This part
    "(SELECT ThroughPutTable_Generic.ThroughPutDate_FW, Count(ThroughPutTable_Generic.ThroughPutDate_FW) AS CountOfThroughPutDate_FW FROM ThroughPutTable_Generic GROUP BY ThroughPutTable_Generic.ThroughPutDate_FW
    "

    Works fine.

    What I am trying to do is get a 2 col recordset and then get the max value from one of the columns.

    Thanks
    Mike

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Try it without the single quotes here
    SELECT MAX('CountOfThroughPutDate_FW')

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

Similar Threads

  1. Query Error
    By keith701a in forum Queries
    Replies: 1
    Last Post: 12-20-2011, 03:56 PM
  2. Replies: 2
    Last Post: 05-27-2011, 05:55 AM
  3. Query Error
    By Cined in forum Queries
    Replies: 3
    Last Post: 03-05-2011, 07:20 PM
  4. Replies: 10
    Last Post: 02-02-2011, 05:48 PM
  5. Query Error
    By zephaneas in forum Queries
    Replies: 0
    Last Post: 11-12-2008, 02:40 PM

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