Thanks to those who responded. I have solved my problem by noting the advice to use a select with order by. In particular, I need to export the data to a csv file anyway, so I use the following copy command: COPY (SELECT household_name, family_list, street_address, city, state, zip, phone_list, email_list FROM "household_data" ORDER BY household_name ) TO '/tmp/household_data.csv' WITH (FORMAT CSV, HEADER); This works. Regards, Dan
|