Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select tc.nombre as evento,
- case
- when tp.id_personal_sga is null then concat(tpe.apellido1,' ', tpe.apellido2,' ', tpe.nombres)
- else concat(p.apellido1,' ', p.apellido2,' ', p.nombres)
- end as participante,
- case
- when tp.id_personal_sga is null then tpe.correo
- else p.correo_personal_institucional
- end as correo,
- case
- when tp.id_personal_sga is null then tpe.telefono_movil
- else p.telefono_personal_celular
- end as telefono, tbi.nombre as institucion,
- TO_CHAR(tp.fecha_inscripcion, 'dd/mm/yyyy') as fecha_inscrito,
- case
- when tep.estado = 'ER' then 'EN REVISION'
- when tep.estado = 'AP' then 'APROBADO'
- when tep.estado = 'AC' then 'CORRECCION'
- else 'NO REGISTRADO'
- end as estadoPago , TO_CHAR(tep.fecha_registro, 'dd/mm/yyyy') as fecha_Pago
- from esq_conv_2020.tbl_preinscripcion tp
- join esq_conv_2020.tbl_congreso tc on tc.idregistro = tp.id_congreso
- left join esq_conv_2020.tbl_evento_pago tep on tep.idregistro = tp.id_pago
- left join esq_datos_personales.personal p on p.idpersonal = tp.id_personal_sga
- left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = id_personal_tmp
- left join esq_conv_2020.tbl_banco_instituciones tbi on tbi.idregistro = tp.id_institucion
- where tp.id_congreso = 94
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement