Access query

I need a query to show the records were field A is > then 10 compare to field B

I would show this record
A        B
500    512
But not this one
500    509

?
LVL 1
GerhardpetAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
What's the difference between those two records? Do you mean you want to show records where the DIFFERENCE between A and B is greater than 10? If so:

SELECT * FROM YourTable WHERE (FieldB - FieldA) > 10
0
 
Helen FeddemaCommented:
Assuming that you want to return records where the difference between A and B is greater than 10, this will do it:

SELECT Nz([FieldB])-Nz([FieldA]) AS FieldDiff, tblTestNos.FieldA, tblTestNos.FieldB
FROM tblTestNos
WHERE (((Nz([FieldB])-Nz([FieldA]))>10));
0
 
GerhardpetAuthor Commented:
Yes that is what I want. Thank you for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.