jotazetaec

Untitled

Oct 20th, 2025
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. select tc.nombre as congreso, tcl.nombre_area as tematica,
  2. regexp_replace(
  3. regexp_replace(
  4. tp.tema,
  5. '<!--.*?-->',
  6. '',
  7. 'g'
  8. ),
  9. '<[^>]+>',
  10. '',
  11. 'g'
  12. ) AS tema,case when tpa.id_personal_sga is null
  13. then concat(tpe.nombres,' ', tpe.apellido1, ' ', tpe.apellido2)
  14. else concat(p.nombres,' ', p.apellido1, ' ', p.apellido2)
  15. end as autor,
  16. case when tpa.id_personal_sga is null
  17. then tpe.correo
  18. else p.correo_personal_institucional
  19. end as correo,
  20. tpa.expositor,
  21. tce.descripcion as estado
  22. from esq_conv_2020.tbl_ponencias tp
  23. join esq_conv_2020.tbl_congreso_linea tcl on tcl.idregistro = tp.id_congreso_linea
  24. join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
  25. join esq_conv_2020.tbl_ponencias_autores tpa on tpa.id_ponencia = tp.idregistro
  26. join esq_conv_2020.tbl_convencion_estado tce on tce.idregistro = tp.id_estado
  27. join esq_datos_personales.personal p on p.idpersonal = tpa.id_personal_sga
  28. left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = tpa.id_personal_tmp
  29. left join esq_catalogos.ubicacion_geografica ug on ug.idubicacion_geografica = p.idtipo_pais_origen
  30. left join esq_catalogos.ubicacion_geografica ug2 on ug2.idubicacion_geografica = tpe.pais_origen::numeric
  31. where tp.id_estado in(71,73,74) --and tc.idregistro = 139
  32. order by tp.idregistro;
Advertisement
Add Comment
Please, Sign In to add comment