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)
 interesting order by

Author  Topic 

sqlbee
Starting Member

11 Posts

Posted - 2003-08-14 : 17:15:03
I have to do like this
select * from Table
order by
table.check_type(in specific order -issues and reversals)
issues=check_type=(a,j,m,p)
reversals=check_type=(R,V),table.ssn,table.check_date

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 17:26:32
I am not understanding your syntax. Could you explain more?

Tara
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-08-14 : 17:29:24
order by
case when table.check_type in ('a','j','m','p') then 0 else 1 end ,
table.ssn,
table.check_date



==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-08-14 : 17:47:57
Wow Nigel. You got it. I couldn't understand the question till I read your answer.

Sam
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-14 : 17:52:30
Even after seeing Nigel's response I didn't get it. But now I do. It just took me a few extra seconds (oh ok so it was minutes).

Tara
Go to Top of Page
   

- Advertisement -