473,498 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with a sort

Hi guys,

I need some help performing a sort. I tried searching Google and Google
Groups, but maybe I'm asking the wrong question or using the wrong
terminology, so I'll explain it.

I have a database of a list of words, such as:

horse
dog
bird
giraffe

I need to sort them by the length of the text, so that they appear
like:

dog
bird
horse
giraffe

I thought that searching for something along the lines of "sort" and
"character length" would yield me an answer. Is this what I would be
looking for? What sort of filter or query can I run to get the desired
result?

Thanks much,
Christine

Dec 7 '06 #1
2 1153
Use the Len() function to get the length of the string, then just sort on
that value, in an array or table.

--
Darryl Kerkeslager

<go*********@gmail.comwrote
I need some help performing a sort. I tried searching Google and Google
Groups, but maybe I'm asking the wrong question or using the wrong
terminology, so I'll explain it.

I have a database of a list of words, such as:

horse
dog
bird
giraffe

I need to sort them by the length of the text, so that they appear
like:

dog
bird
horse
giraffe

I thought that searching for something along the lines of "sort" and
"character length" would yield me an answer. Is this what I would be
looking for? What sort of filter or query can I run to get the desired
result?

Thanks much,
Christine

Dec 7 '06 #2
Hi Darryl,

Thanks so much for pointing me in the right direction :-) I wasn't
aware of that function.

Using Expr1:Len([FieldName]) in the advanced filter/sort did the trick.

Best,
Christine

Dec 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1866
by: george young | last post by:
For each run of my app, I have a known set of (<100) wafer names. Names are sometimes simply integers, sometimes a short string, and sometimes a short string followed by an integer, e.g.: 5, 6,...
5
1792
by: Arpan | last post by:
An ASP application retrieves records from a SQL Server database. In the first page of the application, the user has to enter a password & the columns retrieved from the DB table depends upon the...
0
1367
by: Trey | last post by:
I have a DataTable with a integer field called SortOrder. This table is loaded with and XML file. I have this table in a DataView and I set the RowFilter to filter some row, then I change the...
3
10604
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
5
1572
by: JustSomeGuy | last post by:
According to the docs... http://www.cppreference.com/cpplist/sort.html There is a parameter to the std::list.sort method. I don't understand this methods use... I want to sort the list which...
5
3764
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
9
1682
by: Jack | last post by:
Hello, I have an array that won't sort correctly: Dim MyArrayList As New ArrayList Dim MyString As String = "5,3,44,22,20,2,40,1,32.50" MyArrayList.AddRange(MyString .Split(","c))
9
1553
by: Blarneystone | last post by:
Hi, I am using VB.NET and trying to pull data from two different tables in the database. I am using what I think is standard code. But the data I am pulling is like the following: Table1...
20
4605
by: Martin Jørgensen | last post by:
Hi, I'm reading a number of double values from a file. It's a 2D-array: 1 2 3 4 5 6 7 ------------- 1 3.2 2 0 2.1 3 9.3 4
5
3879
by: fade | last post by:
Good afternoon, I need some advice on the following: I've got a class that has a member std::vector<CStringm_vFileName and a member CString m_path; The vector contains a bunch of filenames with...
0
7167
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
7208
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
7379
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...
0
5464
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,...
1
4915
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...
0
3095
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...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.