PDA

View Full Version : ORDER BY Multiple Columns


tomyknoker
04-17-2007, 04:51 PM
I am trying to order by multiple columns, here is my example and what I want to output

Code
ORDER BY lastName ASC, State ASC

Output
James Anna, Alabama
Ben Bloggs, Alabama
Chris Cats, Alabama
Mark Aims, Delaware

Hopefully you can see what I am trying to achieve, but I don't get there all it does is sort the result by lastName and ignores the states...

guelphdad
04-17-2007, 05:43 PM
show your actual query

Fumigator
04-17-2007, 06:07 PM
Looks like you want to sort by state first, THEN by last name. You have it backwards.