Running PostgreSQL 7.x (Yeah I'm upgrading)
The problem:
I have three to four fields that need to be set if no data is returned.
Was thinking of something like this
SELECT CASE
WHEN default_field IS NULL THEN field_1 = 'blah', field_2 = 'foo', field_3 = 'bar'
ELSE field_1,field_2,field_3
END
Any thoughts on how I could do this?
so think an IF condition
IF this these other fields get these values, else leave the returned values intact