select*from FAMILY whereEXISTS
(select*
from FAMILY_old
where FAMILY_old.Family_Id = FAMILY.Family_Id and FAMILY_old.Family_Score<=7
)and Edit_ind isnull
//////////////////////////////////////////////////////
update family set edit_ind=null where not EXISTS
(select *
from FAMILY_old
where FAMILY_old.Family_Id = FAMILY.Family_Id and FAMILY_old.Family_Score<=7
) and Edit_ind=1
/////////////////////jyada records dhundne ke liye////////
select * from FAMILY where not EXISTS
(select *
from FAMILY_old
where FAMILY_old.Family_Id = FAMILY.Family_Id and FAMILY_old.Family_Score<=7
) and Edit_ind=1
select FAMILY.family_id, FAMILY.form_no,FAMILY.house_number,FAMILY.Name_Of_Head, villages.Village_Name from FAMILY inner join villages on villages.Village_Code=family.Village_Code where EXISTS
(select *
from FAMILY_old
where FAMILY_old.Family_Id = FAMILY.Family_Id and FAMILY_old.Family_Score<=7
) and Edit_ind is null
union select two tables records by anil nain sonipat haryana
2 comments:
THANK YOU FOR YOUR WONDERFULL CODE
mindblooooowing code great keepit up
Post a Comment