Skip to content

Commit db95530

Browse files
stephhouCopilot
andauthored
Update scripts/sql/export_valid_responses.sql
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Steph Housden <167300771+stephhou@users.noreply.github.com>
1 parent 70f172a commit db95530

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/sql/export_valid_responses.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- SQL script to export a csv file containing NHS numbers of submitted responses to a folder on an AVD.
22
-- A valid response is defined as a response where the user has submitted the questionnaire.
3-
-- Run script using psql command line tool or pgAdmin query tool on AVD.
3+
-- Run script using the psql command line tool on AVD; this file uses psql meta-commands (\set, \copy) and will not run in pgAdmin Query Tool.
44

55
\set ON_ERROR_STOP on
66
\copy (SELECT DISTINCT qu.nhs_number FROM questions_user qu JOIN questions_responseset qrs ON qrs.user_id = qu.id WHERE qrs.submitted_at IS NOT NULL) TO 'C:/Users/*YourUsername*/Documents/valid_responses.csv' WITH (FORMAT csv, HEADER true);

0 commit comments

Comments
 (0)