Select * from #A a join #B b on Stuff(a.Ename, charindex('-',Ename),len(a.Ename),'')=b.Ename1 and a.EE<>b.EE1
↧
Help in join with logic
↧
Select * from #A a join #B b on Stuff(a.Ename, charindex('-',Ename),len(a.Ename),'')=b.Ename1 and a.EE<>b.EE1