Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    15

    Unanswered: setting field value based on 2 other fields

    Hello All,

    I have a table with field_a, field_b, field_c where all of the fields are VARCHARs. Is there any way I can execute an update to set field_a to be equal to a combination of field_b and field_c?

    Thanks!
    James

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    update daTable
       set field_a = concat(field_b,field_c)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2003
    Posts
    15
    Great. Thanks!

Posting Permissions

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