gpmsqldev

asked on

# Problem with Sorting...

Hi,

i have following values in day column.

Day

==

F

M

W

Th

Sa

Su

Tu

Each value in above column denotes F - Friday, M-Monday, W-Wednesday, Th-Thursday, Sa-Saturday, Su-Sunday, Tu-Tuesday.

I want to sort those values by day... i.e) M,Tu,W,Th,F.Sa,Su

Anyone please assist with me for this requirement...

i have following values in day column.

Day

==

F

M

W

Th

Sa

Su

Tu

Each value in above column denotes F - Friday, M-Monday, W-Wednesday, Th-Thursday, Sa-Saturday, Su-Sunday, Tu-Tuesday.

I want to sort those values by day... i.e) M,Tu,W,Th,F.Sa,Su

Anyone please assist with me for this requirement...

ASKER CERTIFIED SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

You could also use a Computed Column to "translate" the code to a more useful tinyint...

ASKER

Its helps me to solve my problem... but i am not using this method . Anyway we have to use M as 1, and Tu as 2, and so on....

So i used CASE statement for this problem.. and finally sorted correctly..

So i used CASE statement for this problem.. and finally sorted correctly..