Help in join with logic
That wasn't part of your original requirement, which is why no one accounted for it.Try:DECLARE @A TABLE (Ename char(10), ED char(4), EE char(4), EG char(4)) INSERT INTO @A (Ename, ED, ee, eg) VALUES...
View ArticleHelp 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
View ArticleHelp in join with logic
You might want to consider using a lookup table as a go between to avoid the loss of your indices, if relevant:IF OBJECT_ID('tempdb..#A') IS NOT NULL DROP TABLE #A IF OBJECT_ID('tempdb..#B') IS NOT...
View ArticleHelp in join with logic
Hi, I have run the scripts and all rows are showing in the results which is wrong. I want to shows those Ename with results which have different combinations (ED/ED1, EE/EE1.EG/EG1) in #A1 and #B...
View ArticleHelp in join with logic
Try:DECLARE @A TABLE (Ename char(10), ED char(4), EE char(4), EG char(4)) INSERT INTO @A (Ename, ED, ee, eg) VALUES ('214129-03','03','CAS','GRP'), ('214130-04','04','PER','GRP'),...
View ArticleHelp in join with logic
Please check to make sure your script is working.Try this:Select a. * from #A a join #B b on Stuff(a.Ename, charindex('-',Ename),len(a.Ename),'')=b.Ename1
View ArticleHelp in join with logic
Please try this,select * from #B b inner join (select parsename(replace(Ename,'-','.'),2) Ename2, Ename, ED , EE, EG from #A ) a on a.Ename2=b.Ename1Regards, RSingh
View ArticleHelp in join with logic
How, How I can get the expected result. I want to compare #A with #B and get the descrepancy in the result. Key column is Ename in #A and Ename1 in #B. When we need to remove "hyphen and after the...
View Article