SQL syntax error when using Heroku dataclips to export PostgreSQL database into csv -


i have rails app on heroku i'm testing ensure can download information gathers. i've managed postgresql 9.3.5 working , can spit out public url unreadable dump file, want export particular table csv easier understand can gather data.

i've been looking heroku dataclips. documentation says possible, doesn't explain how. site seemed give tips on sql inputs: http://www.gistutor.com/postgresqlpostgis/10-intermediate-postgresqlpostgis-tutorials/39-how-to-import-or-export-a-csv-file-using-postgresql-copy-to-and-copy-from-queries.html

so entered dataclips:

copy participations(user_full_name, user_email, event_name, event_date_time) '/usr/local/pgsql/data/csv/event_registrations.csv' delimiter ‘,’ csv header 

however, error:

your query couldn't created. error:  syntax error @ or near "copy" line 2: copy participation(user_full_name, user_email, event_name, e...     ^ 

how can fix this? maybe reference i'm using wrong, because don't see difference between i'm doing , what's there.

fwiw, i'm using cloud9 ide terminal.

if trying data out in csv file :

try in command line , put "\" before copy this

\copy participations(user_full_name, user_email, event_name, event_date_time) '/usr/local/pgsql/data/csv/event_registrations.csv' delimiter ‘,’ csv header

or can download pgadmin has option execute query file under query tab on top


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -