Results 1 to 2 of 2
  1. #1
    iostream is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Posts
    2

    Group concat

    how to get from this:



    id string
    1 A
    1 B
    2 C
    to this:

    id string
    1 A B
    2 C
    I found solution (in SQL), but in Access it isn't working !

    Code:
    SELECT id, GROUP_CONCAT(string SEPARATOR ' ') FROM table GROUP BY id;
    Do you know any other solution this problem ?

  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,521
    In Access it's typically done with a function. Here's an example:

    Return a concatenated list of sub-record values
    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. Sum without Group By
    By Beorn in forum Queries
    Replies: 1
    Last Post: 01-07-2011, 08:54 AM
  2. Concat in SQL creates unwanted spaces
    By Deutz in forum Access
    Replies: 3
    Last Post: 12-07-2010, 11:43 PM
  3. Replies: 5
    Last Post: 11-29-2010, 08:16 AM
  4. concat problem
    By leahcim_32 in forum Access
    Replies: 1
    Last Post: 08-28-2009, 05:31 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