Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 A query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-10 : 09:33:37
Jimmy writes "Good day, I am having an issue with a query. First let me display my query below. My query is;
select code, decode_one
from rts_code_dtl
where category_cd = 34;
And the result is below;
Below are times in the am, I am trying to take the 10:00 and 1000 to the bottom. I tried
select code, decode_one
from rts_code_dtl
where category_cd = 34 order by code
ASC;
But it did not work.

CODE DECODE_ONE
1000 10:00
600 6:00
615 6:15
630 6:30
645 6:45
700 7:00
715 7:15
730 7:30
745 7:45
800 8:00
815 8:15
830 8:30
845 8:45
900 9:00
915 9:15
930 9:30
945 9:45"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-10 : 09:35:03
convert the code to integer
order by convert(int, code)




KH


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-10 : 09:38:33
Do you want to move only the first row as last?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -