Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: sorta sorting fun

by roboticus (Chancellor)
on Feb 08, 2008 at 03:56 UTC ( [id://666896]=note: print w/replies, xml ) Need Help??


in reply to sorta sorting fun

That simply shows that they don't know SQL. There's no particular trick to it.
select FName, LName, MName, Surname from TABLE order by substring(MName,1,1), substring(FName,2,1), substring(LName,datalength(LName),1)
This is with MS SQL. It should work on other SQL servers, though the functions may be different...

...roboticus

Replies are listed 'Best First'.
Re^2: sorta sorting fun
by softworkz (Monk) on Feb 08, 2008 at 16:41 UTC
    ++Excellent help!! Thanks!! ++ for the example using MySQL

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://666896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-19 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found