To_date(NULL) in Procedures

Hello!

I have come across the following issue: to_date() function call with a NULL argument value e.g. to_date(NULL, ‘DD.MM.YYYY’) raises an exception when called in a stored procedure.

image

However, in a simple select it produces a NULL value instead
image

Is there a way to achieve the same behaviour in a stored procedure?

Regards,
Denis

It turned out to be my bad. I mistakenly interpreted ‘null’ string as an actual NULL value, which happened when I did not put $ before the field name to actually extract it from a JSON string, rather than refer to it by column.