Results 1 to 4 of 4

Thread: combining rows

  1. #1
    Join Date
    Nov 2004
    Posts
    7

    combining rows

    Hello,

    I have a question about converting a marketing table that contains repeating. I would like to take out the repeating info.

    Here is the first table in CSV format:

    ------------------------------------------
    Name,Age,TV,Radio,Other,Specify Other
    John,32,x,,,
    John,32,,x,,
    John,32,,,x,word of mouth
    Jill,44,,x,,
    Jill,44,x,,,
    Jill,44,,,x,from a friend
    Kim,20,,x,,
    -------------------------------------------

    How do I combine rows in it. In other words
    how do I produce something like this:


    ===============================
    Name,Age,TV,Radio,Other,Specify Other
    John,32,x,x,x,word of mouth
    Jill,44,x,x,x,from a friend
    Kim,20,,x,,
    ===============================

    Since I am at a mental block, your suggestions
    to achieve this in MS-Access or T-Sql will be appreciated.

    Regards,
    Rob

  2. #2
    Join Date
    Aug 2005
    Posts
    29
    try importing the comma delimited data into table and run following qry on ur table.
    it is a workaround that seems to fit ur situation/data not a way to achieve clubbing ..

    select name,age, max(tv), max(radio), max(other), max(specify_other) from the table name
    group by name, age.

  3. #3
    Join Date
    Nov 2004
    Posts
    7
    Thanks a million! Work like a charm.

    Have a great weekend...

  4. #4
    Join Date
    Oct 2005
    Posts
    5

    re

    What would one do if one doesn't want just the max and wants to show all of the answers in one row?

Posting Permissions

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