Hi all,
i would like to build a query that it sorts the results according to the parameters I pass to the IN clause.
Example:
I have a table with this info:
NUM TYPE TEXT
--------------------
1 app night
2 app evening
3 app morning
4 exec sunday
.....
select * from table where text in ('sunday','evening','morning')
i want the query returns the results in the order sunday, evening, morning... like:
4 exec sunday
2 app evening
3 app morning
is there a way to sort the results like that?
Thanx in advance
i would like to build a query that it sorts the results according to the parameters I pass to the IN clause.
Example:
I have a table with this info:
NUM TYPE TEXT
--------------------
1 app night
2 app evening
3 app morning
4 exec sunday
.....
select * from table where text in ('sunday','evening','morning')
i want the query returns the results in the order sunday, evening, morning... like:
4 exec sunday
2 app evening
3 app morning
is there a way to sort the results like that?
Thanx in advance