Create an expression for numbers returned by a query

T

Tom

A query returns the numbers 22,23,24,34,35,36.

I need a function that will return 22-24, 34-36

Thanks for all help!

Tom
 
S

Sam

I think you'll need to group based on Integer division by 10 then do your
Min and Max on this grouped data. Something like....

SELECT Min([NumField]) & "-" & Max([NumField]) AS Range
FROM tblYourTable
GROUP BY [NumField]\10

Maybe, tblYourTable should be replaced by your existing query's name

HTH
Sam
 

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