DELETE FROM TmpHeadC WHERE Id_Havaleh not in (Select id_havaleh From TmpheadH)
AND ISNULL(Id_Havaleh,0) <> 0