• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 21
  • Last Modified:

MS Access Please Help Me Understand This Better Query Number Criteria

I have searched this many times and I have not grasped this idea and I use it a lot. But I struggle every time I change the criteria value.
So I just work around it and have never really fixed it.

Usually I am needing to extract certain IDs. Such as in my SKUs table I may need SkuIDs
Between "0" And "11"

Open in new window

But it returns 1,10,100,1000,10000,10001,etc......1099,11. Done! So I end up with 270 SkuIDs.

I get that in numerical order for Access it is reading left to right and ordering them that way but how do I get this to stop and give me what I want..
I have also used
>0 And <12

Open in new window

Same effects. Thank you for the help.
Dustin Stanley
Dustin Stanley
1 Solution
Gustav BrockCIOCommented:
You are comparing text, not numbers. Try:

Where Val(SKU) Between 0 and 11

Open in new window

Dustin StanleyEntrepreneurAuthor Commented:
Perfect Gustav! Thanks!

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now