Results 1 to 3 of 3

Thread: Merge 2 columns into one with UPDATE.

  1. #1
    Join Date
    May 2009

    Merge 2 columns into one with UPDATE.

    Alright guys, I'm new to this forum and I've been googling for about an hour.

    What I am trying to do is (for a database of about 4million records) merge 2 columns:

    let's say they are `cola` and `colb`. I need to merge them into `colC` not just for the output (like a concat query), I need them to merge and update into colC.

    The reason for this is that I am trying to make it possible to search both colA and colB with 1 string (which for this database, can be a combination of the two).

    Hopefully I explained this clearly enough for someone to help.

  2. #2
    Join Date
    Aug 2005
    The Garden State
    UPDATE table set colC = concat(cola,colb);
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    May 2009
    You sir, are a godsend!

    Thanks a ton!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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