[Tutor] help with postgreSQL and .csv

R. Alan Monroe amonroe at columbus.rr.com
Tue Sep 3 04:35:46 CEST 2013


> my goal is to make it write all the picture url values separated by
> a ';' in just one field and to input the data correctly.  

I haven't used postgresql much. Could it be you're just missing
path_picture as part of your data value? i.e.

UPDATE hotel SET path_picture = + hotel_url
UPDATE hotel SET path_picture = path_picture + hotel_url

Alternatively, you could read the entire csv file and generate the
semicolon-separated strings as dictionary entries, then as a second
step, insert all those dictionary entries into the database.

Alan



More information about the Tutor mailing list