![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, Up until a few seconds ago I thought the only if then else statement available was used only within a database procedure. However I've just been shown the following…which works in 9.2.0. select p.centre_id, pw.participant_id, *if(wd.withdrawal_date is not null, wd.withdrawal_date, wd.withdrawal_changed_date) as withdrawal_date* from participant_wthdrw pw join participants p on pw.participant_id=p.participant_id left join withdrawal_date_view wd on pw.participant_id=wd.participant_id and pw.withdrawal_id=wd.withdrawal_id where pw.active=1 and pw.participant_id in (select participant_id from visits v where visit_status=1 and form=1) and pw.participant_id not in (select participant_id from randomized_participants_view) I can't find this described in the SQL Reference guide for 9.2.0. Anyone got any ideas. Martin Bowes _______________________________________________ Info-Ingres mailing list Info-Ingres (AT) kettleriverconsulting (DOT) com http://ext-cando.kettleriverconsulti...fo/info-ingres |
#3
| |||
| |||
|
#4
| |||
| |||
|
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |