PL/SQL Nested Select With Decode

Have a list of dates (called TAU_LAST_UPDATE_DATE) associated with TAU_UIDs would like to
1. Pick the TAU_UID which has a date field which is null
unless
2. There are multiple date fields with nulls in which case just pick one,
say order by rownum and pick the lowest one
unless
3. There are no nulls in which case pick the oldest date

Have started with

Select *
from
(select *
from
(select TAU_LAST_UPDATE_DATE, TAU_UID,
DECODE(TAU_LAST_UPDATE_DATE, NULL, 01/01/1900) result
from TAU_TREATMENT_AUTHORIZATION)
where result IS NOT NULL
Order by rownum)
where rownum = 1

This works OK.

This gives a single TAU_UID whether there is one or multiple nulls
but how do I get it to, if there is no result select the TAU-UID with the oldest date?

I have the kernel as

Select MIN(TAU_LAST_UPDATE_DATE)
FROM TAU_TREATMENT_AUTHORIZATION

But this doesn't pull the TAU_UID
AND
I need some kind of if then else to connect the oldest date selector
to work if there is no result from the null value statement.

While you're right about the normal reason for the ORA-00960 error, I suspect my typo confused the parser and resulted in a misleaing error message. There should not be a period after the word end. Try this:

select *
from
(select TAU_LAST_UPDATE_DATE, TAU_UID,
TAU_LAST_UPDATE_DATE
from TAU_TREATMENT_AUTHORIZATION
Order by case when TAU_LAST_UPDATE_DATE IS NULL then 0 else 1 end,
TAU_LAST_UPDATE_DATE)
where rownum = 1;