Append to a field in a database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikhil86
    New Member
    • Oct 2006
    • 8

    Append to a field in a database

    Hey guys,
    I am working on some ASP stuff, and I have an html table which displays records from a SQL table.There is one field for adding notes which i want to append to. Basically I have a textbox, in which if a user enters information, it should be appended to a field (rNotes) in my database table. Right now all i can get it to do is overwrite the current information as i'm using an UPDATE query. Any ideas?
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    In update statement you should use:

    Update table_name set
    column_name = column_name + new_data
    where .....

    Comment

    • gateshosting
      New Member
      • Dec 2006
      • 25

      #3
      Originally posted by nikhil86
      Hey guys,
      I am working on some ASP stuff, and I have an html table which displays records from a SQL table.There is one field for adding notes which i want to append to. Basically I have a textbox, in which if a user enters information, it should be appended to a field (rNotes) in my database table. Right now all i can get it to do is overwrite the current information as i'm using an UPDATE query. Any ideas?
      Personally, I would create a notes table, and add records. This way, you can also store things like date/time, user id, etc. You can then just display them in sequential order. I do this with ASP all the time. Just did it yesterday, as a matter of fact. The client loved it.

      Good luck,

      Michael C. Gates

      Comment

      Working...