473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Include NIL/Empty values in a query/report using WHERE

What I have, I think is quite a simple question, I have looked around for quite a while but can't seem to find the solution.
What I have is a database with 1 table, the fields that I am concentrating on are:

ID (Auto number)
Date Received (date)
Shop Name (Text)
Error Log A (Yes/No)
Error Log B (Yes/No)
Error Log C (Yes/No)

What I want is a report as follows:

| Shop name | Number of Applications received | Total clean | % clean |
Example 1 4 1 25%
Example 2 3 0 100%
Example 3 0 0 N/A
Example 4 2 2 0%

I have started to create some queries to do this but what I am facing is that when I do a count of all the records which have NO errors, it doesn't return the data which don’t meet that criteria (ie. if a shop has no error free applications like Example 4 above)
Within the query: for Error Log A,B & C I am putting it as a 'where' clause with the criteria to be '0' (to indicate NO) so it counts the number of shops which have fully clean applications (No errors for A.B,and C) however if a shop has had no clean applications, no result comes back for that shop.
Is there any way to get around this so I can produce the report as above?

I have no problem getting the number of applications a shop has received, it's getting how many of those where 'clean applications' (no having any errors).

Thanks in advance
Apr 10 '08 #1
3 2106
MikeTheBike
639 Expert 512MB
Hi

I am putting it as a 'where' clause with the criteria to be '0' (to indicate NO) so it counts the number of shops which have fully clean applications
This is a little ambiguous, perhaps you could post, at least, the full WHERE clause syntax to give us more of a clue !?

MTB
Apr 10 '08 #2
It's just in the query builder, not in code (I'm not great with SQL!)
Thanks
Apr 10 '08 #3
MikeTheBike
639 Expert 512MB
It's just in the query builder, not in code (I'm not great with SQL!)
Thanks
Hi again

If you Right Click on the top half of the Query Designer and select 'SQL View' if will change to an SQL view (surprise, surprise!). You can copy this text string and paste it in your post, then we can have look at it.

In that event perhaps some else will oblige as I am on hols for the next week.



MTB


ps. To change back to design view Right Click the 'SQL View' Title Bar as select as required.
Apr 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gertjan van Heijst | last post by:
Hi, I really hope someone can help me because I've already spend 2 days on this problem and I'm not getting anywhere. I think the problem is that I don't really understand how text boxes store...
7
by: Dave Hopper | last post by:
Hi I posted a question recently regarding problems I am having getting a value from a list box to use in a query. I got a lot of help, for which I thank you and it's nearly working! But I need...
3
by: Chuck Reed | last post by:
I am working on a sales report where I show weekly sales by category for each of the 52 weeks in the year. Each record in my table/report has the 52 weeks of sales in it. I want to highlight to top...
2
by: bobh | last post by:
Hi All, I have a report which has several sub-reports on it, Each sub-report has its own record source and child/parent link. Sometimes a sub-report may not have data for an entered policy nbr and...
2
by: Zlatko Matić | last post by:
Hello. How to reference selected values from a multi-select list box, as a criteria in a query ? Is it possible at all? Regards, Zlatko
1
by: colleen1980 | last post by:
There is a form where it ask the two dates and then run a query then report. Private Sub Command36_Click() DoCmd.OpenQuery "qryResultsReport" DoCmd.OpenReport "rpt_TopTen", acPreview, "", ""...
4
by: wattar | last post by:
Hi all, I will briefly tell you about the structure of my databse, and then will ask you my question. I have a database for project tracking, with a table for projects, and some other tables...
1
by: brsawvel | last post by:
Hello, I have a form with text/combo boxes that draws from a query and sends records to a report. The query has the following code in the criteria block of some of the columns: ...
4
kcdoell
by: kcdoell | last post by:
Hello: What is the best way to stop a report from running if the query is empty? Currently, I have a form that has a command button on it. The user has to make selections from 3 combo boxes on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.