Joining a table with 2 different tables in a query

AnilBagga

Member
Local time
Today, 21:34
Joined
Apr 9, 2020
Messages
223
In the enclosed DB query "qryUncoatedValueAdd" , I need to select a value - UncoatedRate rate from a table 'tblCustFabricConvRates'. The selection is dependent on the CustomerCode (tblCustRFQHdr) and the FGCode from"tblItemMasterPricingSpecs".

The outer joins are posing an error

Can someone advise the cause and solution
 

Attachments

I did as the error message suggest. I built two queries. Query 1 is all the tables except the conversion rates. Then created a second query using the first query and the conversion rates table.

Sql for second query
Code:
SELECT
   qryUncoatedValueAdd.Widthpremium,
   qryUncoatedValueAdd.RFQID,
   qryUncoatedValueAdd.RFQDtlsID,
   qryUncoatedValueAdd.EndCustomerCode,
   qryUncoatedValueAdd.UncoatedGSMID,
   tblCustFabricConvRates.UncoatedRate
FROM
   qryUncoatedValueAdd
   LEFT JOIN
      tblCustFabricConvRates
      ON (qryUncoatedValueAdd.EndCustomerCode = tblCustFabricConvRates.CustID)
      AND
      (
         qryUncoatedValueAdd.UncoatedGSMID = tblCustFabricConvRates.StdRateID
      )
 
For more information on ambiguous outer joins, see section h) of my web article Query Join Types
 

Users who are viewing this thread

Back
Top Bottom