Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Order By

HI,

I am new to SQL and am having a problem. I want to be able to order my table
by the first alphanumeric character in a specific column of the db. I know
enough sql to use the ORDER BY column_name. The problem I am having is that
it orders the column_name from A-Z then a-z. Some of my fields in this column
have to start with a capital letter and others have to start with a small
letter. How do I order the column so that it will be sorted in an order
like: ACM, adb, BAC, DMA, eas instead of ACM, BAC, DMA, adb, eas? Any help
will be greatly appreciated. Thanks
[609 byte] By [Zeke] at [2007-11-9 21:10:16]
# 1 Re: Order By
I believe you can put the order by field within an UPPER() function. I would
expect this would sort it the way you want

""Zeke"" <soonertim@msn.com> wrote:
>
>HI,
>
>I am new to SQL and am having a problem. I want to be able to order my
table
>by the first alphanumeric character in a specific column of the db. I know
>enough sql to use the ORDER BY column_name. The problem I am having is
that
>it orders the column_name from A-Z then a-z. Some of my fields in this
column
>have to start with a capital letter and others have to start with a small
>letter. How do I order the column so that it will be sorted in an order
>like: ACM, adb, BAC, DMA, eas instead of ACM, BAC, DMA, adb, eas? Any help
>will be greatly appreciated. Thanks
kevin at 2007-11-11 23:52:47 >