Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Posts
    3

    Unanswered: Concatenating row fields

    I have a database that has taken peoples comments (written in paragraph form) and stored them in individual sentences by category, with each row being identified the persons survey number (primary key in main table, foreign key here). I need to put the sentences back into paragraph form, by survey number. Example data below:

    Survey Category Comment
    1 a Blah blah
    1 b yada yada
    1 b differnent yada
    2 a forget-about-it
    .
    .
    .
    .

    What I need is to to put the three comments for survey one back together into one row, in a new table, so it would now read:

    Survey Comment
    1 Blah blah yada yada different yada


    Any thoughts on how this can happen? I can find how to concatenate two columns, but not from rows like this.

    TIA for any assistance, it will be greatly appreciated!!

    Marc

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    In general, you need to do some VBA coding to accomplish the task.

  3. #3
    Join Date
    Mar 2002
    Posts
    23

    Re: Concatenating row fields

    Hi, I don't if this will help or is this what you really wanted.
    Try this:
    ([Field1]&" "&[Field2]&" "&[Field3])

    Originally posted by mackermj
    I have a database that has taken peoples comments (written in paragraph form) and stored them in individual sentences by category, with each row being identified the persons survey number (primary key in main table, foreign key here). I need to put the sentences back into paragraph form, by survey number. Example data below:

    Survey Category Comment
    1 a Blah blah
    1 b yada yada
    1 b differnent yada
    2 a forget-about-it
    .
    .
    .
    .

    What I need is to to put the three comments for survey one back together into one row, in a new table, so it would now read:

    Survey Comment
    1 Blah blah yada yada different yada


    Any thoughts on how this can happen? I can find how to concatenate two columns, but not from rows like this.

    TIA for any assistance, it will be greatly appreciated!!

    Marc

Posting Permissions

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