I am trying to sort 2 columns like :
(SELECT w_id AS "work id" , TO_CHAR(w_date, 'ddMonYY') AS "Date I" FROM W WHERE w_id IN (181185, 181166)
UNION
SELECT w_id as "work id", TO_CHAR(w_date, 'ddMonYY') AS "Date I" FROM W WHERE w_id IN (182394,179945,207781 )
)ORDER BY "work id", "Date I"
The Date I field is obviously sorted as a character.
I need to use the actual date sorting but also represent the date field as a character in my results.
Any clue??
(SELECT w_id AS "work id" , TO_CHAR(w_date, 'ddMonYY') AS "Date I" FROM W WHERE w_id IN (181185, 181166)
UNION
SELECT w_id as "work id", TO_CHAR(w_date, 'ddMonYY') AS "Date I" FROM W WHERE w_id IN (182394,179945,207781 )
)ORDER BY "work id", "Date I"
The Date I field is obviously sorted as a character.
I need to use the actual date sorting but also represent the date field as a character in my results.
Any clue??