Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    115

    Question Unanswered: Replacing existing records in a table

    I have a table that stores all the processed data from other tables. How can I replace the same data in this table when I do "reprocessing"? It's kinda like a combination of delete then insert kind of thing. I cannot simply insert as it will become duplicates. any idea?
    Last edited by tingshen; 02-05-07 at 05:30.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    updates?

    The message I have entered is too short.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Oct 2006
    Posts
    115
    can UPDATE do multiple column update?

    actually the purpose is for rerun of query. If i were to use UPDATE, i need to check if the record exist first. That's not efficient. I am looking for direct replacement.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by tingshen
    can UPDATE do multiple column update?
    yes

    Quote Originally Posted by tingshen
    actually the purpose is for rerun of query. If i were to use UPDATE, i need to check if the record exist first.
    maybe. maybe not.

    Quote Originally Posted by tingshen
    That's not efficient. I am looking for direct replacement.
    really? that is all in how you skin the cat.

    why don't you read Brett Kaiser's sticky at the top of this board, follow the directions, and save everyone a lot of time.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

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