If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
No data returned from query
I can't seem to figure out why this query will not return any data.
SELECT AsiaContracts.AsiaContractShipper, AsiaContracts.AsiaContractShipLine, AsiaContracts.AsiaContractNumber, OceanFreightRate.OceanFreigthRateOriginPort, OceanFreightRate.OceanFreightRateDischargePort, OceanFreightRate. OceanFreightCharge, OceanFreightRate.OceanFreightAdditionalFees, EuropeContracts.EuropeContractShipLine, EuropeContracts.EuropeContractShipper FROM OceanFreightRate INNER JOIN (EuropeContracts INNER JOIN (AsiaContracts INNER JOIN ContractJunction ON AsiaContracts.AsiaContractID = ContractJunction.AsiaContractID) ON EuropeContracts.EuropeContractID = ContractJunction.EuropeContractID) ON OceanFreightRate.OceanFreightRateID = ContractJunction.OceanFreightRateID ORDER BY OceanFreightRate.OceanFreightRateDischargePort; I also posted a screenshot of the design view if anyone needs it. http://advenet.com/photos/cache/1000...sQuery.jpg.jpg Thanks any and all suggestions gchichester |
#2
|
|||
|
|||
No data returned from query
Your problem is you are using all INNER JOINS where you should be using LEFT
JOINS. -- Build a little, test a little. "gchichester" wrote: I can't seem to figure out why this query will not return any data. SELECT AsiaContracts.AsiaContractShipper, AsiaContracts.AsiaContractShipLine, AsiaContracts.AsiaContractNumber, OceanFreightRate.OceanFreigthRateOriginPort, OceanFreightRate.OceanFreightRateDischargePort, OceanFreightRate. OceanFreightCharge, OceanFreightRate.OceanFreightAdditionalFees, EuropeContracts.EuropeContractShipLine, EuropeContracts.EuropeContractShipper FROM OceanFreightRate INNER JOIN (EuropeContracts INNER JOIN (AsiaContracts INNER JOIN ContractJunction ON AsiaContracts.AsiaContractID = ContractJunction.AsiaContractID) ON EuropeContracts.EuropeContractID = ContractJunction.EuropeContractID) ON OceanFreightRate.OceanFreightRateID = ContractJunction.OceanFreightRateID ORDER BY OceanFreightRate.OceanFreightRateDischargePort; I also posted a screenshot of the design view if anyone needs it. http://advenet.com/photos/cache/1000...sQuery.jpg.jpg Thanks any and all suggestions gchichester . |
Thread Tools | |
Display Modes | |
|
|