Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Philadelphia
    Posts
    6

    Unanswered: Appending info into a column

    How would you go about adding info to a column.

    ex. There are 3 tables where all of the information is the same except the last column. The last column contains different types.

    The tables are formatted something like

    Name|Phone|Coverage|AA
    Name|Phone|Coverage|BB
    Name|Phone|Coverage|CC

    But I want to have one table that contains the info as

    Name|Phone|Coverage|AA|BB|CC|

    | = Column change

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Appending info into a column

    Join (possibly outer join) the 3 tables on the common columns.

  3. #3
    Join Date
    Dec 2003
    Posts
    74
    Name|Phone|Coverage|AA|BB|CC|


    But are you not going to have a record for each type here also?

  4. #4
    Join Date
    Dec 2003
    Location
    Philadelphia
    Posts
    6

    Re: Appending info into a column

    I am not even sure how to word this. I tried the join and made sure to connect all of the tables to the most important information. Then I only output the AA, BB, CC columns. So in essence I have 3 free standing columns that are based on the same ID.

    Here comes the problem. How do I match these columns with their related row.

    I would like to take these 3 columns and append them to the end of the row with the corresponding information.

    ex. I have AA|BB|CC and have Name|Number|Date

    and want to have Name|Number|Date|AA|BB|CC

    (the original rows looked something like my original post description)

    but not all rows that had a BB correspond to a row with AA and would I want them to end up looking like this

    ex. Name|Number|Date| |BB|CC

    I know this is confusing, but I think it is coherent.

    Please help!

    Originally posted by andrewst
    Join (possibly outer join) the 3 tables on the common columns.

Posting Permissions

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