Subject | Re: [firebird-support] Valid reasons for sorting on a column one doesn't select? |
---|---|
Author | Aage Johansen |
Post date | 2005-08-14T13:33:36Z |
plinehan wrote:
CED
DVD
DVDL
DVDS
Inst
Kino
LAS
LVid
SVid
UMD
X
The the customer wants records with those values are to be sorted like this:
Kino
Inst
LVid
SVid
DVD
DVDL
DVDS
LAS
CED
UMD
X
I do this by having an additional field in a table with these values -
namely a sort-order:
CED 70
DVD 50
DVDL 52
DVDS 54
Inst 20
Kino 10
LAS 60
LVid 30
SVid 40
UMD 74
X 99
I join with this table and the "sort order" field is used in the "order by"
clause, but never displayed.
How to do it à la Oracle ?
--
Aage J.
> ...I have some values for a column:
>
> Can anyone give me a few valid reasons why
> one might want to sort on a field that
> one doesn't select?
>
CED
DVD
DVDL
DVDS
Inst
Kino
LAS
LVid
SVid
UMD
X
The the customer wants records with those values are to be sorted like this:
Kino
Inst
LVid
SVid
DVD
DVDL
DVDS
LAS
CED
UMD
X
I do this by having an additional field in a table with these values -
namely a sort-order:
CED 70
DVD 50
DVDL 52
DVDS 54
Inst 20
Kino 10
LAS 60
LVid 30
SVid 40
UMD 74
X 99
I join with this table and the "sort order" field is used in the "order by"
clause, but never displayed.
How to do it à la Oracle ?
--
Aage J.