Subject using extract on null values
Author Christian Kaufmann
Hi,

I have the following query:

select distinct SR.COURSE, R.GENDER as RELAYGENDER, A.GENDER,
extract(year from A.BIRTHDATE) as YOB
from SWIMRESULT SR
left join ATHLETE A on SR.ATHLETEID = A.ATHLETEID
left join RELAYINFO R on SR.ATHLETEID = R.RELAYINFOID

For records in SWIMRESULT where I have no record in ATHLETE, I get an
error because "extract(year from A.BIRTHDATE)" fails.

Is there a way, to get null or another default value for YOB in this case?

cu Christian