Click here to Skip to main content
15,913,115 members
Home / Discussions / Database
   

Database

 
GeneralRe: Booking Pin
zeroonea29-Apr-07 20:10
zeroonea29-Apr-07 20:10 
GeneralRe: Booking Pin
Christian Graus29-Apr-07 22:23
protectorChristian Graus29-Apr-07 22:23 
GeneralRe: Booking Pin
dayanandip3-Nov-09 2:25
dayanandip3-Nov-09 2:25 
Questionstored procedure conditional ASC/DESC Pin
Meysam Mahfouzi29-Apr-07 4:14
Meysam Mahfouzi29-Apr-07 4:14 
AnswerRe: stored procedure conditional ASC/DESC Pin
Arun.Immanuel29-Apr-07 5:01
Arun.Immanuel29-Apr-07 5:01 
GeneralRe: stored procedure conditional ASC/DESC Pin
Meysam Mahfouzi29-Apr-07 5:21
Meysam Mahfouzi29-Apr-07 5:21 
GeneralRe: stored procedure conditional ASC/DESC Pin
Arun.Immanuel29-Apr-07 5:58
Arun.Immanuel29-Apr-07 5:58 
GeneralRe: stored procedure conditional ASC/DESC Pin
Arun.Immanuel29-Apr-07 6:04
Arun.Immanuel29-Apr-07 6:04 
I have tried this with the folloing example by changing @a to 1 or 0 alternatively:

It works fine.

declare @a int
set @a=1
select * from tableName
order by case
when @a=0 then columnName
end ,

case
when @a=1 then columnName
end desc


But the problem is we have to design the conditons in such a way that only one of the conditions must evaluate to true.

Change the value "0" to "1" in the above code.
It will throw U an error.

So, please make sure to check the above problem.



Regards,
Arun Kumar.A

QuestionRe: stored procedure conditional ASC/DESC Pin
Meysam Mahfouzi29-Apr-07 13:43
Meysam Mahfouzi29-Apr-07 13:43 
AnswerRe: stored procedure conditional ASC/DESC Pin
Arun.Immanuel29-Apr-07 16:04
Arun.Immanuel29-Apr-07 16:04 
AnswerRe: stored procedure conditional ASC/DESC Pin
Mike Dimmick29-Apr-07 11:31
Mike Dimmick29-Apr-07 11:31 
GeneralRe: stored procedure conditional ASC/DESC Pin
Christian Graus29-Apr-07 12:18
protectorChristian Graus29-Apr-07 12:18 
QuestionPlease Help me Pin
Mohammed Sobhi29-Apr-07 2:29
Mohammed Sobhi29-Apr-07 2:29 
AnswerRe: Please Help me Pin
Arun.Immanuel29-Apr-07 4:39
Arun.Immanuel29-Apr-07 4:39 
AnswerRe: Please Help me Pin
Christian Graus29-Apr-07 11:16
protectorChristian Graus29-Apr-07 11:16 
Questionsql server connection problem Pin
Rupesh Kumar Swami28-Apr-07 0:31
Rupesh Kumar Swami28-Apr-07 0:31 
AnswerRe: sql server connection problem Pin
kubben28-Apr-07 1:21
kubben28-Apr-07 1:21 
QuestionRe: sql server connection problem [modified] Pin
Rupesh Kumar Swami30-Apr-07 20:43
Rupesh Kumar Swami30-Apr-07 20:43 
AnswerRe: sql server connection problem Pin
kubben1-May-07 3:35
kubben1-May-07 3:35 
GeneralRe: sql server connection problem Pin
Rupesh Kumar Swami1-May-07 3:54
Rupesh Kumar Swami1-May-07 3:54 
GeneralRe: sql server connection problem Pin
kubben1-May-07 4:11
kubben1-May-07 4:11 
GeneralRe: sql server connection problem Pin
Rupesh Kumar Swami1-May-07 4:20
Rupesh Kumar Swami1-May-07 4:20 
GeneralRe: sql server connection problem Pin
kubben1-May-07 4:27
kubben1-May-07 4:27 
GeneralRe: sql server connection problem Pin
Rupesh Kumar Swami1-May-07 5:01
Rupesh Kumar Swami1-May-07 5:01 
GeneralRe: sql server connection problem Pin
kubben1-May-07 5:03
kubben1-May-07 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.