Results 1 to 2 of 2

Combine / Concatenate Multiple Values in Different Records that Have Same ID

  1. #1
    RBusiness is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Feb 2012
    Posts
    3

    Combine / Concatenate Multiple Values in Different Records that Have Same ID

    Hello,

    I'm stuck on something, maybe you can help.

    I have to concatenate the data in multiple records into one record. They have "skus" associated with them.

    I have two columns.

    ColumnSku: Which contains a product sku
    ColumnModel: Which contains a model numbers



    ColumnSku can contain the same sku hundreds of times
    ColumnModel can contain the same model several times but not for the same sku

    What I need to do is this
    For every time a sku is shown in ColumnSku, take the model in ColumnModel and join them together separated by a comma.

    For example

    ColumnSku | ColumnModel
    SKU1111 | Model11111
    SKU1111 | Model22222
    SKU1111 | Model33333
    SKU1111 | Model44444
    SKU1111 | Model55555
    SKU9999 | ModelHHHHH
    SKU9999 | ModelJJJJJ
    SKU9999 | ModelMMMMM

    Would end up like this
    ColumnSku | ColumnModel
    SKU1111 | Model11111,Model22222,Model33333,Model44444,Model5 5555
    SKU9999 | ModelHHHHH,ModelJJJJJ,ModelMMMMM

    How do I do this? Keep in mind too that I barely know update queries and have never used a Module (other than my failed attempt earlier today)

    Please help if you can.
    RB

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,587
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Combine values from multiple fields
    By jsimard in forum Queries
    Replies: 8
    Last Post: 06-09-2011, 01:05 PM
  2. Replies: 8
    Last Post: 01-21-2011, 10:28 AM
  3. Concatenate Multiple Rows into One
    By Knarly555 in forum Queries
    Replies: 5
    Last Post: 11-12-2010, 06:51 PM
  4. Replies: 3
    Last Post: 10-16-2009, 09:27 AM
  5. Need Code to Concatenate All Records
    By menntu in forum Programming
    Replies: 4
    Last Post: 06-05-2009, 09:43 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
  •  
Tech Forums: Microsoft Office Forums