Results 1 to 4 of 4
  1. #1
    usa_dreamer2002 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    4

    Need Help with Joins

    Hi all,
    I have a table with few records as follows:

    id record1 firstvalue secondvalue
    01 1111 12 0


    02 1111 0 2
    etc
    I want to have all similar records in one line like

    01 1111 12 2

    I will appreciate any input

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Based on your example

    SELECT record1, Max(firstvalue) As MaxFirst, Max(secondvalue) AS MaxSecond
    FROM TableName
    GROUP BY record1
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    usa_dreamer2002 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    4
    Sorry for the late response. That solved my problem. Thanks a million. Don't know how mark the post solved thus.

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem and welcome to the site by the way. Thread can be marked solved via the "Thread Tools" link at the top, but I'll do it since I'm already here.
    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. SQL joins are whack
    By Dell in forum Access
    Replies: 6
    Last Post: 10-08-2010, 06:47 AM
  2. Help With Left Joins
    By DaveyJ in forum Queries
    Replies: 23
    Last Post: 06-28-2010, 08:38 AM
  3. Joins - One PK to many FK - Acceptable?
    By Dega in forum Database Design
    Replies: 7
    Last Post: 05-08-2010, 07:52 AM
  4. Complex Joins??
    By objNoob in forum Queries
    Replies: 0
    Last Post: 03-16-2010, 02:42 PM
  5. Nested Joins
    By zephaneas in forum Programming
    Replies: 0
    Last Post: 11-10-2008, 11:49 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