473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sorting question

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
3 1816
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Bullock | last post by:
Hello, I am at wit's end with an array sorting problem. I have a simple table-sorting function which must, at times, sort on columns that include entries with nothing but a space (@nbsp;). I...
22
by: mike | last post by:
If I had a date in the format "01-Jan-05" it does not sort properly with my sort routine: function compareDate(a,b) { var date_a = new Date(a); var date_b = new Date(b); if (date_a < date_b)...
7
by: Karin Jensen | last post by:
Hi I am running a PHP program that connects to an Access 2000 database via ODBC: $results = odbc_exec($connection_id, $sql_select); Is it possible to sort the contents of $results? I wish to...
3
by: SilverWolf | last post by:
I need some help with sorting and shuffling array of strings. I can't seem to get qsort working, and I don't even know how to start to shuffle the array. Here is what I have for now: #include...
1
by: aredo3604gif | last post by:
On Sun, 10 Apr 2005 19:46:32 GMT, aredo3604gif@yahoo.com wrote: >The user can dynamically enter and change the rule connection between >objects. The rule is a "<" and so given two objects: >a <...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
10
by: Sjaakie | last post by:
Hi, I'm, what it turns out to be, fooling around with 3-tier design. At several websites people get really enthusiastic about using custom dataobjects instead of datasets/-tables. While trying to...
4
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have a vb.net 2.0 app that is loading a GridView with a DataSource that is returned from a function. The definitions in the function are: Dim ReportDS As DataSet = New DataSet Dim...
6
by: =?Utf-8?B?RGFu?= | last post by:
I am reposting a question from about 3 weeks ago ("sorting capability"). I have an aspx page in which I get the data from a database dynamically, through C# code, by creating a dynamic table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.