How to convert '' to NULL in postgreSQL
I have a postgreSQL table that accepts a date in yyyy-mm-dd format and does not accept if the format is an incoming date ''
(no date). There may be some cases where it ''
is passed as a date. Can anyone help me write a function that checks if the incoming date is "" and then replaces it with NULL and then adds it to the db.
+3
source to share