Advertisement
jotazetaec

Untitled

Nov 9th, 2023
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. select tc.nombre as congreso, tcl.nombre_area as tematica, tp.tema ,
  2. case when tpa.id_personal_sga is null
  3. then concat(tpe.nombres,' ', tpe.apellido1, ' ', tpe.apellido2)
  4. else concat(p.nombres,' ', p.apellido1, ' ', p.apellido2)
  5. end as autor,
  6. case when tpa.id_personal_sga is null
  7. then tpe.correo
  8. else p.correo_personal_institucional
  9. end as correo, tce.descripcion as estado
  10. from esq_conv_2020.tbl_ponencias tp
  11. join esq_conv_2020.tbl_congreso_linea tcl on tcl.idregistro = tp.id_congreso_linea
  12. join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
  13. join esq_conv_2020.tbl_ponencias_autores tpa on tpa.id_ponencia = tp.idregistro
  14. join esq_conv_2020.tbl_convencion_estado tce on tce.idregistro = tp.id_estado
  15. left join esq_datos_personales.personal p on p.idpersonal = tpa.id_personal_sga
  16. left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = tpa.id_personal_tmp
  17. where tc.idregistro = 94
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement