Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

Complicated 4 Table Query.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Horne - 26 May 2006 13:25 GMT
Hi guys, bit of a complicated one here and I'll try my best to explain the
problem.

I have 4 tables.

Orders
=======
OrderNumber
Customer
Contact
OrderDate
CustomersOrderNumber

Order_Details
=========
OrderItemID
ItemNumber
ItemType
Description
Quantity
Price

Deliveries
=======
DeliveryNoteID
OrderNumber
Date
DespatchMethod

Delivery_Details
===========
DeliveryDetailID
ItemNumber
QtyDelivered
ItemComplete

All four are related to each other. The idea is that you have an order
(Orders) which has various items (Order_Details), against each order you then
get a delivery (Deliveries) which also has various items (Delivery_details) -
which relate to the order's items.

I basically want to run a query that will list all orders and their items
and also any deliveries and delivered items against each order. Which is fine
apart from one problem. For orders where there are no deliveries nothing will
be shown, but I want the results to show 0 instead of showing nothing.

So can anyone tell me what SQL I need to write to achieve this?
JethroUK© - 26 May 2006 21:21 GMT
for existing records you need to run an update query (replace nulls with 0)
and for future records you need to set default field values

> Hi guys, bit of a complicated one here and I'll try my best to explain the
> problem.
[quoted text clipped - 43 lines]
>
> So can anyone tell me what SQL I need to write to achieve this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.