You'll want to sort the query in the SQL. Depending on your database there
should be a function to convert text to a numeric value . . . in Oracle
there is to_number(field2). You can use this in your order by clause, like
such:
select field1, field2
from table1
order by to_number(field2)
I believe in Access there is a val() function? Your biggest drawback is if
there is a value in the database that can't be converted to a number . . .
then the SQL will fail. If you can convert the field to a numeric type it
would be a good idea.
Dan
-----Original Message-----
From: Johnson, Dana [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 12, 2000 2:47 PM
To: '[EMAIL PROTECTED]'
Subject: Query / Array sorting
Hello all:
Need help on sorting Query's and Array's
have a query which consists of two fields
field1(varchar), field2(varchar)
field 2 data consists of numbers 0 through 150
how can I sort numerically i.e. 0,1,2,3,4,5,6 etc...
Dana E. Johnson
Sr. Web Developer
CIT
VTF/Technology Financing Services
[EMAIL PROTECTED]
(904) 620-7458
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.