Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    173

    Unanswered: Concatenate Variable Values in a Query

    I need to know the best way to accomplish the following:

    I have a query (qryClaims_Actions) that shows 2 fields ClaimAutoID and OfficeActions - each action is a seperate record entered in Claims_OfficeActions table

    Using the rows below, I want to dynamically build a query (qryClaimsCombinedActions) that has 1 line per ClaimAutoID, but will combine the actions into 1 field..... (see 2nd query below), with a comma between each...

    Some claims may have action, while others may have 1, 2, 5, 10, who knows how many....


    1st query

    qryClaims_OfficeActions

    ClaimAutoID OfficeAction

    110 AB
    112 AB
    112 CD
    112 DE
    113 CD
    114 AB
    114 CD



    2nd query - group by ClaimAutoID - combine all actions in 1 field


    ClaimAutoID CombinedActions
    110 AB
    112 AB, CD DE
    113 CD
    114 AB, CD

    Thanks! - AB

  2. #2
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

Posting Permissions

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