Help with order by case... syntax with mimer db



I'm working with mimer mobile db and need som help with the following
statement in a procedure.

I have the following today:
SELECT column1 FROM table1
ORDER BY case when some_expression then column2 else column3
end;

I would like to do the following but the syntax seems to be wrong:

SELECT column1 FROM table1
ORDER BY case when some_expression then coloumn1, column2 else
coloumn3, column4 end;

i.e. add some more columns to the order expression.

Alternatively, I would like to do something like:

SELECT column1 FROM table1{INDEX case when some_expression then index1
else index2 end};

where index1 and index2 are indexes created for table1.

Any idea's of how to accomplish this?
Cheers
//Kid

.



Relevant Pages

  • Re: Joining one to many relational table
    ... Table1 has A,A,B,B,B and Table2 has A, B. I want to join ... > for B in Table1. ... > For Table1 the values for column1 is A,A,B,B,B and the correspoding values ...
    (microsoft.public.cert.exam.mcad)
  • Re: Joining one to many relational table
    ... > For Table1 the values for column1 is A,A,B,B,B and the correspoding values ... > as Table2 has 2 rows. ... >>> for B in Table1. ...
    (microsoft.public.cert.exam.mcse)
  • Re: Joining one to many relational table
    ... >> For Table1 the values for column1 is A,A,B,B,B and the correspoding ... >> as Table2 has 2 rows. ... >>> You might have a bit more luck with one of the SQLServer groups. ...
    (microsoft.public.cert.exam.mcse)
  • Re: Joining one to many relational table
    ... Since your table1 violates the first normalization, join query does not ... >> For Table1 the values for column1 is A,A,B,B,B and the correspoding ... >> In Table2 the values for column1 is A,B and the correspoding values in ...
    (microsoft.public.cert.exam.mcad)
  • Re: Joining one to many relational table
    ... Table2 the values for column1 is A,B and the correspoding values in column2 ... >> for B in Table1. ... > Also, to use a New York phrase: Not for nothin', but this is the MCSE group. ...
    (microsoft.public.cert.exam.mcse)