Advertisement
jotazetaec

Untitled

Dec 9th, 2024
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. select tc.nombre as congreso, upper(tcl.nombre_area) as tematica,
  2. CASE
  3. WHEN tce.id_personal_sga IS NULL THEN concat(tpe.nombres, ' ', tpe.apellido1, ' ', tpe.apellido2)
  4. ELSE concat(p.nombres, ' ', p.apellido1, ' ', p.apellido2)
  5. END AS responsableArea
  6. from esq_conv_2020.tbl_congreso_linea tcl
  7. join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
  8. left join esq_conv_2020.tbl_congreso_equipo tce on tce.idregistro = tcl.id_responsable
  9. LEFT join esq_datos_personales.personal p ON p.idpersonal = tce.id_personal_sga
  10. LEFT join esq_conv_2020.tbl_personal_ext tpe ON tpe.idregistro = tce.id_personal_tmp
  11. where tc.id_convencion = 9
  12. order by tc.nombre, tcl.nombre_area
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement