How can I sort my data in alphabetic order?

Let’s learn how can I sort my data in alphabetic order. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

Sort data in varchar alphabet order

I have table with following data . 1 AAAAA01 AAAAA01 AAAAA01 B21 AAAAAA1 B3 AB100 and I want to sort data in following order AAAAAA1 AAAAA01 AAAAA01 AAAAA01 AB100 B21 B3 1 I wrote a statement but not give me correct result. Select * from dbo.Section order by CASE WHEN not Section like '%[^0-9]%' THEN CONVERT(int,Section) WHEN Section like '[0-9]%' THEN CONVERT(int,SUBSTRING(Section,1,PATINDEX('%[A-Z]%',Section)-900000)) END For your help i am providing script of table INSERT [dbo].[Section...

Answer:

Please try: Select * from dbo.Section order by REPLACE (REPLACE (REPLACE (REPLACE (REPLACE (REPLACE...

Read more

A.Goutam at Stack Overflow Mark as irrelevant Undo

Other solutions

Answer:

Hi... Kinda of a loaded question. If you are using the raw mysql data via something like phpadmin thats...

Read more

tompet at Answerbag.com Mark as irrelevant Undo

Answer:

Average monthly temperatures and precipitation levels [study island]

Read more

community wiki at wiki.answers.com Mark as irrelevant Undo

Show me how Excel can sort numbers and text in the order I want

Any Excel gurus in the room? I have an Excel spreadsheet with over 800 rows of data. Each row begins with a number (like 0001), and some have letters after the numbers (like 0001a). The Sort function doesn’t sort the way Iâ&#...

Answer:

Simply changing the column format to "Text" doesn't actually change the existing values to...

Read more

Milkman Dan at Ask.Metafilter.Com Mark as irrelevant Undo

Custom sort on second sort field

QUESTION: I have three columns of data that need to be sorted. The first column is a list of names which needs to be sorted in ascending alphabetical order. The second column is an ID number to be sorted in ascending numeric order. The third column contains...

Answer:

I can't advise you on the the Dataoption arguments because they are specific to your data and what you...

Read more

Miningco.com Mark as irrelevant Undo

Sort macro to run on most but not all worksheets

QUESTION: I am using2007 and would like to have a macro that automatically runs when I open a workbook to sort the information based on the values entered into column E. Most of the worksheets are sorting based on the values in column E but I have a...

Answer:

Amy Under formulas, define name; enter a range name like database or amy or something. Under Refers...

Read more

Miningco.com Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.