A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

No data returned from query



 
 
Thread Tools Display Modes
  #1  
Old May 18th, 2010, 05:42 PM posted to microsoft.public.access.queries
gchichester
external usenet poster
 
Posts: 3
Default 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  
Old May 18th, 2010, 06:42 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.