0

Hi All,
I have column which consist of data like

AB1
AB2
AC3
AD5
AB1
AB2

When i do order by this coulumn, its not ordering properly.
It should order like
AB1
AB1
AB2
AB2
AC3
AD5

Thanks

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by debasisdas
0

Hi debasis,
Thanks for reply..
The format is not same some times the data will be like

AB1A
AB2B

I think we cannot include this column in order by.
Any idea or suggestions?

Thanks

0

I think you are looking for

order by left(column_name,1),substring(column_name,2,1),substring(column_name,3,1)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.