Solved

SQL: order by amount of characters within a field

Posted on 2004-09-30
1
221 Views
Last Modified: 2006-11-17
Hi,

I have a competition message. I want to create a new table using query analyser using an SQL statement.

It shoud sort the competition message from shortest length to greatest length.

I am using to do this in SQL and only ASP as a last resort.

Thanks, tp
0
Comment
Question by:tippingpoint
1 Comment
 
LVL 10

Accepted Solution

by:
m8rix earned 500 total points
ID: 12196597
From my understanding, I think this is what you are trying to do.

SELECT CommentField, OtherField1, OtherField2, OtherField3 INTO NewTable
FROM YourTable
ORDER BY Len([CommentField]);
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax Help on SP 4 57
API not working 33 62
ASP Button to clear text 4 54
ASP/VB email question 4 34
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question