Good morning from South Africa Sathish, Maybe you can try the below: %macro Macro_Name(Server, Table); update MyTable
set ht = b.Height
FROM MyTable a JOIN &Server..Project.dbo.&Table. b
ON a.ID = b.ID and ht is in ("null","") and /***(Null or '')***/
b.R_date = (select min(R_date) from &Server..Project.dbo.&Table. cc where a.ID = cc.ID) /*SET ONE*/ %Macro_Name('192.168.11.3', 'Table1'); %Macro_Name('192.168.11.3', 'Table2'); %Macro_Name('192.168.11.3', 'Table3'); /*SET TWO*/ %Macro_Name('192.168.12.3', 'Table1'); %Macro_Name('192.168.12.3', 'Table2'); %Macro_Name('192.168.12.3', 'Table3'); Give it a shot... Marlene
... View more