select * from Tbl_STP st join Tbl_STP_Details std on std.N_Srno=st.N_Srno join Tbl_Sub_Area_Mst sub on sub.C_Code=std.C_Subarea_code_to join up u on u.[fieldforce_name]=st.C_FS_Code and SOUNDEX (u.territory)=SOUNDEX(sub.C_Name) join Tbl_FS_Mst fs on fs.C_Code=u.[fieldforce_name] and fs.C_Area_Code=std.C_Area_Code where u.territory not like %sa0%
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)