Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I currntly have a microsoft query which consists of 3 tables. 'STKDETAIL'
'SNTRACE' & 'VIEW_STOCKED_PARTS' with the following joints: 1. 'STKDETAIL' to 'SNTRACE' on field Uniqbatch 2. 'STKDETAIL' to 'VIEW_STOCKED_PARTS' on field part no. I have tried to change joint 1 to an outer joint so that ALL values from 'STKDETAIL' are shown and records from 'SNTRACE' if appliacable, but it says the you can't have out joins if there are more than two tables in the query. How do i get around it. I have enter the full SQL below if it is easier to change that. SELECT SNTRACE.Serial_Number, SNTRACE.Batch_Uniq, STKDETAIL.Unique_Transaction_R, STKDETAIL.Date_Booked, Sum(STKDETAIL.Add_to_Stock) AS 'Sum of Add_to_Stock', STKDETAIL.Add_to_Stock, STKDETAIL.Part_Number, STKDETAIL.DrawingIssue, STKDETAIL.Location, STKDETAIL.Stock_Qty, STKDETAIL.Ex_Job_No, STKDETAIL.UniqBatchLocatioo, VIEW_STOCKED_PARTS.Part_Description, STKDETAIL.Trans_Memo_Field FROM FMData.dbo.SNTRACE SNTRACE, FMData.dbo.STKDETAIL STKDETAIL, FMData.dbo.VIEW_STOCKED_PARTS VIEW_STOCKED_PARTS WHERE STKDETAIL.Part_Number = VIEW_STOCKED_PARTS.Part_Number AND STKDETAIL.UniqBatchLocatioo = SNTRACE.Batch_Uniq GROUP BY SNTRACE.Serial_Number, SNTRACE.Batch_Uniq, STKDETAIL.Unique_Transaction_R, STKDETAIL.Date_Booked, STKDETAIL.Add_to_Stock, STKDETAIL.Part_Number, STKDETAIL.DrawingIssue, STKDETAIL.Location, STKDETAIL.Stock_Qty, STKDETAIL.Ex_Job_No, STKDETAIL.UniqBatchLocatioo, VIEW_STOCKED_PARTS.Part_Description, STKDETAIL.Trans_Memo_Field HAVING (STKDETAIL.Location Like 'BONDED ST') AND (Sum(STKDETAIL.Add_to_Stock)=1) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Query Outer join with three tables | Excel Discussion (Misc queries) | |||
Sorting of a pivot table by outer and inner row field combinations | Excel Discussion (Misc queries) | |||
MS Query: Looking for a work-around to 2-table limits for outer jo | Excel Discussion (Misc queries) | |||
filling combo boxes from single outer source | Excel Discussion (Misc queries) | |||
how do i subtotal an outer column in a pivot table? | Excel Worksheet Functions |