Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL - appending a text field help

Options
  • 23-04-2006 7:44pm
    #1
    Closed Accounts Posts: 920 ✭✭✭


    I have a field that contains say web addresses separated by a ^ symbol.
    If I have www.google.com^www.yahoo.com^, what would be the command to add another address to this field (called addresses) without deleting whats already there.


Comments

  • Registered Users Posts: 2,781 ✭✭✭amen


    Update TableName
    set Fieldname = FieldName + '^www.cnn.com'
    where fieldname = whatever
    should do it


  • Closed Accounts Posts: 920 ✭✭✭elvis2002


    thanks, thats it.


  • Registered Users Posts: 131 ✭✭theexis


    You could also use UPDATETEXT for a non-logged approach if the field will contain large blocks of text


  • Registered Users Posts: 2,497 ✭✭✭optiplexgx270


    elvis2002 wrote:
    I have a field that contains say web addresses separated by a ^ symbol.
    If I have www.google.com^www.yahoo.com^, what would be the command to add another address to this field (called addresses) without deleting whats already there.
    i wont ask why its done like this :confused:

    But just to say that that should be in its own table with a foreign key etc.


Advertisement