I'm writing a SQL query (Postgresql) where I'm grabbing 6 different things:
i.e. select a, b, c, d, e, etc...
If e is empty, I still want to pull that record with e = null. Am I supposed to use coalesce(e, 'null')?
By the way, e comes from I.g = J.g AND J.f = K.f AND K.e = L.e, where I have I.g to start with.
Sometimes J has a value for the "e column" and sometimes it doesn't. If it has it, I want to get e and if it doesn't, I want to get "null".
i.e. select a, b, c, d, e, etc...
If e is empty, I still want to pull that record with e = null. Am I supposed to use coalesce(e, 'null')?
By the way, e comes from I.g = J.g AND J.f = K.f AND K.e = L.e, where I have I.g to start with.
Sometimes J has a value for the "e column" and sometimes it doesn't. If it has it, I want to get e and if it doesn't, I want to get "null".