Query returns no results when data exists

ph00086

Registered User.
Local time
Today, 13:25
Joined
Aug 22, 2012
Messages
16
Hi,

I have a query that shoudl produce information about the previous days production using several sub-queries. One of these uses information about the previous days two shifts which is entered into the database seperately and all the others are just information about the day in general.

If no information is enetred into any of the fields then the query returns no results what so ever!! Sometimes data may not be enetered into some fields but the other information still needs to be displayed.

My question is how do i get the query to return information even if some fields are empty.

Any solutions would be great;y appreciated.

Thanks
 
Sounds like you need to use one, or more, OUTER JOINS (i.e. LEFT JOIN) in one or more of your queries. Hard to tell which at this point since we can't see what you have. But an outer join takes all records from one table and only those that match from the other and displays them. The inner join only displays records if there are matching records in both tables.
 

Users who are viewing this thread

Back
Top Bottom