extract part of a value

L

Lori

I've ready all of the postings about separating alpha-numeric, pulling apart
numbers but none of the posts deal with decimals. How would I get a query to
look at in this case # of hours billed each week and pull out only the .5 in
the 40.5, 35.5, 8.5, etc.?

I'm trying to write a query that will count the number of 5s, 7s, 8, 35s and
40s in a weekly total but I also need the .5s.

Any ideas????
 
K

KARL DEWEY

To count 0.5's try this --
SELECT Sum(IIF([YourField] - Int([YourField]) = .5, 1, 0)) AS [Count_of_0.5]
FROM YourTable;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top