完全外部加入MS Access [英] Full Outer Join In MS Access
本文介绍了完全外部加入MS Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
(Select IIF(GBL.BU='GBL DLV','Horizontal','Vertical') as Unit, IIF(GBL.BU='GBL DLV','BTOFF',GBL.BU) as BU,GBL.Proj_Vertical,AVG(GBL.FTE) as Off_FTE,AVG(GBL.AVB) as Off_ABP,AVG(GBL.TBH) as Off_TBH,AVG(GBL.UTL) as Off_UTL,AVG(RTBL.FTE) as Tot_FTE,AVG(RTBL.AVB) as Tot_AVB,AVG(RTBL.TBH) as Tot_TBH, AVG(RTBL.UTL) as Tot_UTL,GBL.Month From
(Select BU,Proj_Vertical,Sum([AVA FTE]) as [FTE] ,Sum(ACGHRAWP) as [AVB],Sum(TotBLDHR) as [TBH] ,IIF(Sum(TotBLDHR)=0,'0',(Sum(TotBLDHR)/Sum(ACGHRAWP))*100) as [UTL],Month From GeowisebilledMain Where Proj_Vertical Not In ('CIO OFFICE','GBM','STG') And Emp_Curr_Location='OFFSHORE' And Month > CDate('5/28/2012') And (Month between @StartDate and @EndDate) And BU Not in ('SUPPORT','ES') Group By BU,Proj_Vertical , Month Order By Month Desc) as GBL
FULL OUTER Join
(Select BU,Proj_Vertical,Sum([AVA FTE]) as [FTE] ,Sum(ACGHRAWP) as [AVB],Sum(TotBLDHR) as [TBH] ,IIF(Sum(TotBLDHR)=0,'0',(Sum(TotBLDHR)/Sum(ACGHRAWP))*100) as [UTL],Month From GeowisebilledMain Where Proj_Vertical Not In ('CIO OFFICE','GBM','STG') And Month > CDate('5/28/2012') And (Month between @StartDate1 and @EndDate1) And BU Not in ('SUPPORT','ES') Group By BU,Proj_Vertical,Month Order By Month Desc) as RTBL On RTBL.Proj_Vertical = GBL.Proj_Vertical And RTBL.Month=GBL.Month Group By GBL.BU,GBL.Proj_Vertical,GBL.Month)
This Query is not working in MS Access. Can anyone sugget me some other solution.
推荐答案
哈!
到目前为止没有答案..
好吧,我得到了解决方案.
如果完全外部联接在某些地方不起作用,则可以在该联接上应用左外部联接,然后在同一联接上应用右外部联接,然后将两个联接的结果合并.它将给出完全外部联接的结果.
Hah !
No Answer so far..
Well i got the solution.
if full outer join is not working some where then you can apply a left outer join then apply a right outer join on the same and Union the results of both t he join. it will give the result of full outer join.
这篇关于完全外部加入MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文