Order by [message #373647] |
Sun, 29 April 2001 20:37 |
Arjun V
Messages: 14 Registered: March 2001
|
Junior Member |
|
|
I hv a column with say the following values
rat
cat
fat
mat
I want to order the values, but i want the 'fat' to be on the top of the list..and rest of the values after that in the order by manner.
fat
cat
mat
rat
How can i do that. Please help
Thanks in advance.
Arjun V
|
|
|
Re: Order by [message #373652 is a reply to message #373647] |
Mon, 30 April 2001 09:41 |
John R
Messages: 156 Registered: March 2000
|
Senior Member |
|
|
If we assume that your table is called TEMP and has a column called TEXT, containing the data you mentioned, then this will work
select TEXT
from TEMP
order by decode(TEXT,'Fat',1,2),TEXT
|
|
|
|
|