1
I'm new to Postgresql and using pgadmin 4 on a mac. I have a table that has international and national addresses recorded in 4 columns for international, and four for national (country, state, city, zip). I want to combine international data with the national data so that all addresses data is in the same columns. by copying all international postal codes into the US zip code column. I tried the following SQL statement and a few others with no success.
UPDATE data_table
SET intl_postal_code = usa_zip
WHERE usa_zip IS NULL
nothing happens with the above approach. Other variations resulted in some data copying but many rows were deleted.
I also tried using concat:
SELECT concat(usa_zip, intl_postal_code);
This also did not work, an error was returned saying the columns don't exist though they do.