CASE WHEN table1.text IS NULL THEN table2.numbers
ELSE table1.text
END AS newcolumn
When running this code I keep getting this error:
ERROR: CASE types character varying and integer cannot be matched
You would think that this would not cause problems since I’m creating a new column within my query. I’d also like to point out that I’m using an old version of PostgreSQL if that helps.
1 Answer