Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    113

    Unanswered: Update Statement

    Hello,

    I need to update a table from the master table that has the no valuesfor the following columns:

    market_code
    list_acct_no
    list_phone_no

    My update script is as follows:

    update tjuggernaut
    from DC_tlisting t, tjuggernaut j
    where t.market_code = j.market_code
    and t.list_acct_no = j.list_acct_no
    and t.list_phone_no = j.list_phone_no

    But shouldn't I have something else in here?

    This script will not run.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2004
    Posts
    113
    I did look at that document and I am still confused as to whether to use a select clause or set clause.

    Can you help me?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I am still confused as to whether to use a select clause or set clause.
    Eventually you'll likely need both.
    Start experimenting with hardcoded values & expand your knowledge from there.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Oct 2003
    Posts
    17
    Try This..

    update tjuggernaut t
    Set (t.market_code
    , t.list_acct_no
    , t.list_phone_no
    ) = (Select j.market_code , j.list_acct_no , j.list_phone_no From tjuggernaut j
    where t.market_code = j.market_code
    and t.list_acct_no = j.list_acct_no
    and t.list_phone_no = j.list_phone_no)

    -Ash

Posting Permissions

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