Answer the question
In order to leave comments, you need to log in
Postgresql how to convert empty string to "Not Submitted"?
Good afternoon! There is a selection:
select status from rezultat
It is necessary that in the status field there should be the line "Not sent" instead of an empty line, please tell me how this can be done?
Answer the question
In order to leave comments, you need to log in
What is an "empty string", a zero-length string, or NULL? However, both cases are covered by the construction
COALESCE(NULLIF(status, ''), 'Не отправлено')
. If there can be a handful of spaces in the status - first trim.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question