I have a table phy1 where I have physicians names column is pnames
I have a another table phy2 where I have two columns pnames and pnames_valid.
say for example:
Table phy1:(column Pname)
James Bolton,MD
James Bolton
James H Bolton, MD
J Bolton
J H Bolton, MD
Huang Ho
Table Phy2:(pname and pname_valid)
James Bolton,MD J Bolton
James Bolton J Bolton
James H Bolton, MD J Bolton
J H Bolton J Bolton
J H Bolton, MD J Bolton
So the task is: phy1 is my master table and phy2 is look up table.
if phy1.pname is same as phy2.pname then we need to return phy2.pname_valid names else retain values from phy1.pname.