Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

order by all the words in a sentence

Posted on 2012-08-21
5
Medium Priority
?
478 Views
Last Modified: 2012-08-22
select varcharColumn order by varcharColumn

this is only ordering by first word

how to order by entire sentence
0
Comment
Question by:rgb192
  • 2
  • 2
5 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 38315297
can you please clarify what you "think" it should do?
it will indeed order by the text in the column, basically sorting by the first character, if equal by second, if equal by third etc.
there is no "sorting by words" as such.
please show sample data of what you get and what you request
0
 
LVL 1

Author Comment

by:rgb192
ID: 38316749
getting

a c
a a
a b
a d
b
c


want this order

a a
a b
a c
a d
b
c


but I think the sort is only only on the first word before the space
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38317052
with really that data? I must doubt that, so you might want to show the "correct" data resp the script to reproduce that behaviour
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 1000 total points
ID: 38318294
I have never seen this behavior with letters
0
 
LVL 1

Author Closing Comment

by:rgb192
ID: 38319515
thank you
by telling me that this is not possible,
I checked my data and saw that some columns had additional spaces
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…

580 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