locked
combining tables RRS feed

  • Question

  • I have two tables and if the owner numbers from both tables match then I want the lateral column from the t_property table to be put in the t_shareholder table.  How do I do that?
    Wednesday, May 2, 2018 7:50 AM

Answers

  • you mean owner and lateral are column names?

    if yes, it would look like this

    UPDATE t2
    SET lateral = t1.lateral
    FROM t_shareholder t2
    JOIN t_property t1
    ON t1.owner = t2.owner
    WHERE t1.lateral > ''

    Assuming both tables have owner and lateral columns and base don owner value match ,lateral value has to get updated

    If your column name is different please use correct ones instead


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Wednesday, May 2, 2018 8:04 AM

All replies