--Barkodu ve Kodu farklı çift kayıtlar. select NoId,Kodu,Barkodu,StokAdi,F4Fiyat, (select count(S3.Barkodu) from STOKKARTI AS S3 WHERE S3.Barkodu=S1.Barkodu GROUP BY S3.Barkodu HAVING count(S3.Barkodu)>1 ) SAYI from STOKKARTI as S1 WHERE Barkodu IN (select Barkodu from STOKKARTI as S2 GROUP BY Barkodu HAVING count(Barkodu)>1 ) and Barkodu<>Kodu and Kodu not like 'Ent_%' and Barkodu is not null order by Barkodu,NoId -- Çift Barkodu olan ürünler. select NoId,Kodu,Barkodu,StokAdi,F4Fiyat, (select count(S3.Barkodu) from STOKKARTI AS S3 WHERE S3.Barkodu=S1.Barkodu GROUP BY S3.Barkodu HAVING count(S3.Barkodu)>1 ) SAYI from STOKKARTI as S1 WHERE Barkodu IN (select Barkodu from STOKKARTI as S2 GROUP BY Barkodu HAVING count(Barkodu)>1 ) and Kodu not like 'Ent_%' and Barkodu is not null order by Barkodu,NoId --- select NoId,Barkodu,Kodu from STOKKARTI S WHERE Barkodu in (select Barkodu from STOKKARTI as S2 where Barkodu<>Kodu and Kodu not like 'Ent_%' and Barkodu is not null and Barkodu <>'' GROUP BY Barkodu HAVING count(Barkodu)>1 ) order by Barkodu,Kodu -- select NoId,Barkodu,Kodu from STOKKARTI S WHERE Barkodu in (select Barkodu from STOKKARTI as S2 where Barkodu<>Kodu and Kodu not like 'Ent_%' and Barkodu is not null and Barkodu <>'' GROUP BY Barkodu HAVING count(Barkodu)>1 ) order by Barkodu -- select Barkodu from STOKKARTI as S2 where Barkodu<>Kodu and Kodu not like 'Ent_%' and Barkodu is not null and Barkodu <>'' GROUP BY Barkodu HAVING count(Barkodu)>1