Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Outer Joins

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query Outer join with three tables Jim Excel Discussion (Misc queries) 0 February 15th 07 09:52 PM
Sorting of a pivot table by outer and inner row field combinations andygoon Excel Discussion (Misc queries) 1 February 5th 07 11:02 PM
MS Query: Looking for a work-around to 2-table limits for outer jo Jim Excel Discussion (Misc queries) 0 December 27th 06 07:41 PM
filling combo boxes from single outer source alekm Excel Discussion (Misc queries) 1 February 17th 06 01:49 PM
how do i subtotal an outer column in a pivot table? Britt K Excel Worksheet Functions 0 December 29th 04 02:07 PM


All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"