Advertisement
jotazetaec

Untitled

Dec 21st, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. select tc.nombre as evento,
  2. case
  3. when tp.id_personal_sga is null then concat(tpe.apellido1,' ', tpe.apellido2,' ', tpe.nombres)
  4. else concat(p.apellido1,' ', p.apellido2,' ', p.nombres)
  5. end as participante,
  6. case
  7. when tp.id_personal_sga is null then tpe.correo
  8. else p.correo_personal_institucional
  9. end as correo,
  10. case
  11. when tp.id_personal_sga is null then tpe.telefono_movil
  12. else p.telefono_personal_celular
  13. end as telefono, tbi.nombre as institucion,
  14. TO_CHAR(tp.fecha_inscripcion, 'dd/mm/yyyy') as fecha_inscrito,
  15. case
  16. when tep.estado = 'ER' then 'EN REVISION'
  17. when tep.estado = 'AP' then 'APROBADO'
  18. when tep.estado = 'AC' then 'CORRECCION'
  19. else 'NO REGISTRADO'
  20. end as estadoPago , TO_CHAR(tep.fecha_registro, 'dd/mm/yyyy') as fecha_Pago
  21. from esq_conv_2020.tbl_preinscripcion tp
  22. join esq_conv_2020.tbl_congreso tc on tc.idregistro = tp.id_congreso
  23. left join esq_conv_2020.tbl_evento_pago tep on tep.idregistro = tp.id_pago
  24. left join esq_datos_personales.personal p on p.idpersonal = tp.id_personal_sga
  25. left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = id_personal_tmp
  26. left join esq_conv_2020.tbl_banco_instituciones tbi on tbi.idregistro = tp.id_institucion
  27. where tp.id_congreso = 94
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement