Complex updating query, Help!!!!!

sql Malaysia
  • 13 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

    and C2 in table A with colom col1 and col2 in table B. If match for example C1,C2 =

Post a reply

No one has replied yet! Why not be the first?

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

Contribute

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 first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” - Tom Cargill