Changes between Version 7 and Version 8 of OnyxDatabaseReporting


Ignore:
Timestamp:
01/18/12 12:51:36 (12 years ago)
Author:
Nick Holden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OnyxDatabaseReporting

    v7 v8  
    118118;
    119119
    120 Using UNION to produce a list of S numbers and DOBs for participants who are either study specific recruits or have a specific primary or secondary diagnosis:
     120Using UNION to produce a list of S numbers and DOBs for participants who are either study specific recruits or have a specific primary or secondary diagnosis (UNION combines two SELECTs with duplicates removed):
    121121
    122122mysql -h briccsdb -u auditor -p briccs -e "
    123 SELECT barcode as 'Participant', birth_date as 'DOB'
     123SELECT enrollment_id as 'Participant', birth_date as 'DOB'
    124124FROM participant, questionnaire_participant, question_answer, category_answer
    125125WHERE participant.id = questionnaire_participant.participant_id
     
    129129AND category_answer.category_name = 'Aortic_Stenosis'
    130130UNION
    131 SELECT barcode as 'Participant', birth_date as 'DOB'
     131SELECT enrollment_id as 'Participant', birth_date as 'DOB'
    132132FROM participant, questionnaire_participant, question_answer, category_answer
    133133WHERE participant.id = questionnaire_participant.participant_id