Solved

SQL: order by amount of characters within a field

Posted on 2004-09-30
1
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pass asp session variable to a js function in an asp script 6 36
Insert Button on a table 16 55
send email part1 9 52
PHP encrypted string and passing to a ASP Page 12 87
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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