I'm using SPLIT_TO_TABLE to split a column which has multiple comma separated values
The input table looks like this:
I'm using the following query:
SELECT ID,DATE_KEY,COUNTRY, y.value AS new_sub
FROM TABLE, LATERAL split_to_table(TABLE.SUBDIVISIONS, ', ') y
Which results in the following output:
I want to have the rows that have NULL subdivision also included in the output.
Is there a way to conditionally use the function to just apply when the column is a non null value or would it be better to just join two outputs (one where subdivision is null and the result of my query)?

