473,770 Members | 4,029 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1841
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******@pcdata sheet.com
www.pcdatasheet.com
"Robert" <st*******@boei ng.com> wrote in message
news:Hs******** @news.boeing.co m...
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.sp am> wrote in message
news:8i******** *********@newsr ead1.news.atl.e arthlink.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******@pcdata sheet.com
www.pcdatasheet.com
"Robert" <st*******@boei ng.com> wrote in message
news:Hs******** @news.boeing.co m...
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*******@boei ng.com> wrote in message
news:Hs******** @news.boeing.co m...
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.sp am> wrote in message
news:8i******** *********@newsr ead1.news.atl.e arthlink.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******@pcdata sheet.com
www.pcdatasheet.com
"Robert" <st*******@boei ng.com> wrote in message
news:Hs******** @news.boeing.co m...
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
2546
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 want all of the spaces to be put in the first slots of the array. IE 6 does this. But Firefox 0.9.1 doesn't, and I don't know why. I have not been able to reproduce it in very simple form (which is itself a puzzle). But example code is...
22
4168
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) { return -1; } else
7
3050
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 use a regex-based sort order that you can't do in Access 2000* SQL with "ORDER BY".
3
6412
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 <stdio.h> void main(void) { char lines; int count = 0, i;
1
2644
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 < b simply means that b < a can't be set, also it must be a != b. >And with three objects a < b , b < c means a < c > >I studied Quick Union Find algorithms a bit and if I understood them >correctly, once the user gives the input setting the...
19
25466
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 sort columns based on the column header the user has clicked in both Ascending and Descending formats.
4
4285
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 is stored in a double linked list, the whole list is sorted for the next round. My problem appears when subjecting the program to heavy load, that is, when I run the simulation for more than 10,000 miliseconds (every event occurs in...
10
2795
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 write such layers myself I got stuck on how to get filtered or sorted data from the data-layer. This is what I got: Objects
4
11163
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 ReportTable As System.Data.DataTable = New System.Data.DataTable("SendTo") The ReportTable is populated row by row by data gotten back from the
6
4079
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 using TableHeaderCell and TableHeaderRow. The data is binded to the table by using a DataSet and Data Reader. The responses on the forum made me think that it would be easier to sort the data in the table (when clicking on the header column), by...
0
9439
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10071
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9882
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.