|
Posted by Andy Hassall on 10/14/41 11:26
On Sat, 10 Sep 2005 21:22:23 GMT, hamstring <agent@agent.com> wrote:
>Is it possible to 'order by' 2 columns in a database
Yes, "ORDER BY col1, col2".
>My database only has 2 columns.
>1st column a bit of text
>2nd column a int number
>typically
>
>I want it sorted to
>COL1 COL2
>AA 7
>AD 5
>AZ 5
>BC 5
>AB 2
>AF 1
>
>Any ideas, as I can pnly get 1 column sorted ??
Could you explain your logic behind the sort order you've specified?
It looks like: ORDER BY col2 DESC, col1
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|