Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2005

    Unanswered: Logic on UPDATE query

    I am dealing with two tables and I am trying to take one column from a table and match the records with another table and append the data of that column.

    I used an update query that looks like this:

    UPDATE Acct_table Set Acct_table.Score =
    (Select Score_tbl.Score from Score_tbl
    Where Acct_table.Acctnb = Score_tbl.Acctnb

    This process has been running for over an hour and a half and is building a large log file. I am curious to know if there is a better command that I can use in order to join the tables and then just drop the column from one to the other. Both tables are indexed on Acctnb.

    Any insight would truly help.

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    UPDATE A Set A.Score = S.Score
    from Acct_table A
    JOIN Score_tbl S
    ON A.Acctnb = S.Acctnb
    “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
    Nov 2002
    Does anyone else hear an echo?

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Quote Originally Posted by Brett Kaiser
    Does anyone else hear an echo?
    No, not a thing. Why?

    Yes, I deleted Thrasy's duplicated post


  5. #5
    Join Date
    Jul 2005

Posting Permissions

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