Complex updating query, Help!!!!!

sql Malaysia
  • 11 years ago

    There are two tables:

     Table A                                                                   Table B

    ---------------------------------------                                        ----------------------------------------

    AID      C1       C2      Status                                     BID           col1       col2         status

    ---------------------------------------                                        ---------------------------------------------------------

    1         22         21        AA                                        1                22         21           A

    2         23         25        BB                                        2                23         21           C

    3          23         21        AA                                       3                11         44           B


    So here is the case,

     I want to update tableB Colom Status with condition like this:

    search colom status in table A that equal to AA, compare col C1

  • 11 years ago


    Just a question are you comparing tableA.Status (integer?) to tableA.C1 (text?)? It seems that your post is not complete.. Ehehe, or maybe i'm not good at understanding.. ΓΌ

  • 11 years ago

    Looks pretty incomplete to me.


Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The generation of random numbers is too important to be left to chance.” - Robert R. Coveyou