Skip to content

Commit

Permalink
Sorted result
Browse files Browse the repository at this point in the history
  • Loading branch information
Pål Ellingsen committed Apr 3, 2019
1 parent fd533db commit e0e3b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export/export_search.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ print("Content-Disposition: attachment; filename=AeN_sample_database_export.tsv\
sys.stdout.flush()

# Setting export to tab separated such that Excel likes it better
full_query = 'COPY (SELECT ' + get_fields(columns) + ',' + other_str + 'from aen where ' + filter_query +") TO STDOUT CSV HEADER DELIMITER '\t' "
full_query = 'COPY (SELECT ' + get_fields(columns) + ',' + other_str + 'from aen where ' + filter_query +" ORDER BY eventdate, eventtime, sampletype, sampledepthinmeters ASC ) TO STDOUT CSV HEADER DELIMITER '\t' "


cur.copy_expert(full_query,sys.stdout.buffer)
Expand Down

0 comments on commit e0e3b52

Please sign in to comment.