By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

sorting question

P: n/a
I am trying to sort a column of numbers in a large . How do I build my
query? Thanx

Example:
11
2
3
2
55
9
..
..
..

want to sort and get a result set like

2
2
3
9
11
55
..
..
..
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Robert,

If your numbers are always all digits as you show here, go to your table and
change the data type to Integer if your numbers will always be between -32000
and +32000 or to Long if outside this range. Then in your query you simply
include the number field in the query and set the sort to ascending.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <st*******@boeing.com> wrote in message
news:Hs********@news.boeing.com...
I am trying to sort a column of numbers in a large . How do I build my
query? Thanx

Example:
11
2
3
2
55
9
.
.
.

want to sort and get a result set like

2
2
3
9
11
55
.
.
.

Nov 12 '05 #2

P: n/a
Thanx, I changed the datatype to int. Did not like that (I suspect there
were some records that caused it some troubles). From your suggestion
regarding datatypes I then started to experiment and found the decimal data
type worked.
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:8i*****************@newsread1.news.atl.earthl ink.net...
Robert,

If your numbers are always all digits as you show here, go to your table and change the data type to Integer if your numbers will always be between -32000 and +32000 or to Long if outside this range. Then in your query you simply
include the number field in the query and set the sort to ascending.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <st*******@boeing.com> wrote in message
news:Hs********@news.boeing.com...
I am trying to sort a column of numbers in a large . How do I build my
query? Thanx

Example:
11
2
3
2
55
9
.
.
.

want to sort and get a result set like

2
2
3
9
11
55
.
.
.


Nov 12 '05 #3

P: n/a
Robert, would it be possible to use a Double instead of a Decimal size
number field?

Access is not capable of sorting the Decimal field reliably. For details,
see:
Incorrect Sorting (Decimal fields)
at:
http://allenbrowne.com/bug-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Robert" <st*******@boeing.com> wrote in message
news:Hs********@news.boeing.com...
Thanx, I changed the datatype to int. Did not like that (I suspect there
were some records that caused it some troubles). From your suggestion
regarding datatypes I then started to experiment and found the decimal data type worked.
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:8i*****************@newsread1.news.atl.earthl ink.net...
Robert,

If your numbers are always all digits as you show here, go to your table

and
change the data type to Integer if your numbers will always be

between -32000
and +32000 or to Long if outside this range. Then in your query you simply include the number field in the query and set the sort to ascending.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <st*******@boeing.com> wrote in message
news:Hs********@news.boeing.com...
I am trying to sort a column of numbers in a large . How do I build my query? Thanx

Example:
11
2
3
2
55
9
.
.
.

want to sort and get a result set like

2
2
3
9
11
55

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.