How do you do it? Here's the quick answer:

SELECT
CASE
WHEN TRIM(FIELD_MAYBE_NULL) is NULL THEN FIELD_NEVER_NULL
ELSE FIELD_NEVER_NULL || ', ' || FIELD_MAYBE_NULL
END AS CONCATTED_FIELD

FROM TABLE


Course it helps that NULL = '' in Oracle.

Labels: ,