I want to replace 1234 in membername in table1 with "family of table2.EName"(Membername) in Relation 2 with match query table2.familyid = table1.familyid
Is there any Query to Replace 1234 with"Family of ABC or RAM"
EDIT: Ignore this post. My answer is irrelevant to your modified post declare @tab TABLE(Membername varchar(20),Relation int) insert into @tab SELECT 'ABC', 1 union all SELECT '1234', 2 union all SELECT 'XYZ', 3 union all SELECT 'UYX', 4 union all SELECT 'AZS', 5
update @tab set Membername = 'Family of ABC' WHERE ISNUMERIC(Membername) =1 SELECT * FROM @tab
-- How is a row identified as being a family vs a member of a family?
-- How are individual families identified? In other words, what piece of information should be used to designate 1234 as being "Family of ABC" (and not "Family of XYZ"), if indeed there was another family named XYZ?