Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: Appending a Field

    I know this must be simple, but I am stumpted, please help!

    I am writing a stored procedure in SQL 2000 where an incomming variable is a string of characters (a couple of sentences) and I want to add that to the existing string of characters in a table field called "Comments".

    I do not know how to append the text in a field. How is that best done?

    The basic function of the procedure is to take whatever string is passed to it and append it to the current contents of the field "Comments". As the procedure is ran over and over again, the field is constantly appended with the incomming text.

    What is the best way to do this? Can anyone give me an example?

  2. #2
    Join Date
    Jan 2003
    Location
    London, England
    Posts
    106
    This one should be quite easy:

    UPDATE table SET Filed = Field + @Value WHERE ID = @ID
    Frettmaestro
    "Real programmers don't document, if it was hard to write it should be hard to understand!"

  3. #3
    Join Date
    Jan 2004
    Posts
    3
    Thank you very much!

    It is working now.

Posting Permissions

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