Help in appending strings command

Discussion in 'Databases' started by ichkoguy, Feb 24, 2009.

  1. #1
    I am going to create a table with 2 fields. There will be many rows. In the 2nd field, i will not just have one string stored. The process will be dynamic and after each process, the resulting strings have to be appended with the previous string seperated by a comma.

    For example, if the first string is "APPLE", 2nd string is "BOY" should be appended with apple itself seperated by a comma.

    So i need to update in the same field separated by a comma. What is the command for this in sql. I am using oracle. Need your help.
     
    ichkoguy, Feb 24, 2009 IP
  2. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't know oracle, so I can't help you with the query. But I would like to comment on the 'comma separated values' you want to store in the second field of your table. Now, you might have a good and valid reason to do so, but usually this is a red flag as far as the normalization of your database is concerned.
    Why do you want to store multiple values in one field? Are you sure this won't complicate things later on, when you need to consult that data (like searches)?
     
    CreativeClans, Feb 24, 2009 IP
  3. ichkoguy

    ichkoguy Active Member

    Messages:
    666
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3

    Good thought dude. But there is no other go for us. We have to store the values in the same field only. There can be no complications while retreiving it.

    I need the query on how to do it. Can anyone give me the query?
     
    ichkoguy, Feb 25, 2009 IP