本文介绍了我想加入3个没有重复的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个想加入他们的名字相同,但问题是他们显示重复请帮助







I have three and want join them where name equal to same but the problem is they show duplicates please help



select  Distinct  shopentry.[Date]
      ,shopentry.[Name]
      ,shopentry.[Mandi Rate Subha]
      ,shopentry.[Mandi Rate Total Subha]
      ,shopentry.[Bandi Rate Total]
     ,shopentry.[Mandi Rate Sham]
     ,shopentry.[Mandi Rate Total Sham]
      ,shopentry.[Total]
,shopentry.[total doodh]
	  ,shop_cash.[Cash]
      ,shopentry.[Cash], 
	  shopacc.Baqaya,
	  shopacc.Commission
	 from shopentry inner join shopacc on shopentry.Name=shopacc.Name 
	  inner join shop_cash on shop_cash.Name=shopacc.Name  where shopentry.Name='Danish' and shopentry.date between '12/11/2017' and '12/13/2017'





我尝试过:



结果:

推荐答案


select shopentry.[Date],shopentry.[Name],shopentry.[Mandi Rate Subha],shopentry.[Mandi Rate Total Subha],shopentry.[Bandi Rate Total],shopentry.[Mandi Rate Sham]
     ,shopentry.[Mandi Rate Total Sham],shopentry.[Total],shopentry.[total doodh],shop_cash.[Cash],shopentry.[Cash],shopacc.Baqaya,shopacc.Commission
from shopentry 
	inner join shopacc on shopentry.Name=shopacc.Name 
	inner join shop_cash on shop_cash.Name=shopacc.Name  
where shopentry.Name='Danish' and shopentry.date between '12/11/2017' and '12/13/2017'
group by shopentry.[Date],shopentry.[Name],shopentry.[Mandi Rate Subha],shopentry.[Mandi Rate Total Subha],shopentry.[Bandi Rate Total],shopentry.[Mandi Rate Sham]
     ,shopentry.[Mandi Rate Total Sham],shopentry.[Total],shopentry.[total doodh],shop_cash.[Cash],shopentry.[Cash],shopacc.Baqaya,shopacc.Commission


这篇关于我想加入3个没有重复的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 10:56