I am using postgresql and I am trying to separate an array column with single values into different columns. The original column called fee_rule_id
is like [98, 120, 133]. I want it to be column1 98, column2 120 column3 133.
I was using unnest function but I got error code 42883. Hint: No function matches the given name and argument types. You might need to add explicit type casts.
How do I fix that?
my query is like
select id
, modified
,unnest(fee_rule_id) as fee_id
from final_data
Claire is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.