Update statement help

  • Different scenario i have where i

    i have 3 tables

    Table1

    AcctNo producttypedesc runmonth runyear

    111 teast 9 2009

    222 tesdfst2 8 2009

    333 tesgsg 9 2009

    table2

    AcctNo officerID producttypedesc

    111 FADCDG test

    333 98989hh test3

    Table 3

    runmonth runyear

    9 2009

    i want to update producttypedesc to table1 from table 2 based on acctno but at the same time the data should be updated in table1 where runmonth and runyear matches with table3

    i try to do the inner join as bru explained in the other update and added a where clause

    but i got an error message The multi-part identifier "table3.runmonth" could not be bound.

  • Please show your code. A little hard to help when we can't see what you've done.

  • What ever is there in table 3 is already available in Table1 so what else do you want to apply.

    Because we could understand your problem and provide the solution everytime, it is not possible, last time it was pretty straight forward, but here give a Create table script, and some insert table script and then describe what you want to achieve.

    Also when posting Scripts don't copy and paste in the post rather use the scripting tags for better understanding like this

    Select * from Table1

    now compare it with

    Select * from Table1

    Makes Sense??


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply