Advertisement
jotazetaec

Untitled

Oct 16th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. select tp.idregistro ,tc.nombre as congreso, tcl.nombre_area as tematica,
  2. regexp_replace(
  3. regexp_replace(
  4. regexp_replace(tema, '<[^>]*>', '', 'g'),
  5. '/\\*.*?\\*/', '', 'g'
  6. ),
  7. '\s+', ' ', 'g'
  8. ) as tema,
  9. case when tpa.id_personal_tmp is null then p.correo_personal_institucional
  10. else tpe.correo
  11. end as correoPonente,
  12. case when tpa.id_personal_tmp is null
  13. then concat(p.apellido1,' ',p.apellido2,' ',p.nombres)
  14. else concat(tpe.apellido1,' ',tpe.apellido2,' ',tpe.nombres)
  15. end as autor,
  16. tce.descripcion ,
  17. case when tp.codigo = 'CCIUTM-REG-ADM'
  18. then 'MAGISTRAL'
  19. else ''
  20. end as tipo
  21. from esq_conv_2020.tbl_ponencias tp
  22. join esq_conv_2020.tbl_ponencias_autores tpa on tpa.id_ponencia = tp.idregistro
  23. join esq_conv_2020.tbl_congreso_linea tcl on tp.id_congreso_linea = tcl.idregistro
  24. join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
  25. join esq_conv_2020.tbl_convencion_estado tce on tce.idregistro = tp.id_estado
  26. left join esq_datos_personales.personal p on p.idpersonal = tpa.id_personal_sga
  27. left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = tpa.id_personal_tmp
  28. where tce.clave in('AP','PP','AGG','ACMA','ACME')
  29. order by tc.nombre, tcl.nombre_area
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement