I'm starting from a CSV file with a lot of zipcode in the form:
FROM;TO;CITY
1000;1200;TESTCITY
and I want to insert it in a postgres table with the columns:
- ZIPCODE : varchar
- CITYNAME : varchar
So, for each row in the CSV, I must create "TO - FROM" records in the table.
Is there a way to do this with a simple query, like
insert into zipcodes (zipcode, cityname)
select RANGE(1000;1200), cityname;