When the date is NULL I want to display 'N/A', but if the date is not null I want to display the date in the dB. This is what I currently have and I get a DataType Mismatch in the THEN/ELSE expressions. I am assuming it is because I am trying to display a character in a date field.
SELECT
CASE WHEN created_at IS NULL
THEN 'N/A'
ELSE created_at
END AS created_at
FROM example.example_id
Is this possible?
Your assumption is correct: you can't mix a date(time) datatype with a varchar datatype. The solution is to cast the date to a varchar:
the convert here may need some tweaking depending how you want it displayed.