Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select tc.nombre as congreso, upper(tcl.nombre_area) as tematica,
- CASE
- WHEN tce.id_personal_sga IS NULL THEN concat(tpe.nombres, ' ', tpe.apellido1, ' ', tpe.apellido2)
- ELSE concat(p.nombres, ' ', p.apellido1, ' ', p.apellido2)
- END AS responsableArea
- from esq_conv_2020.tbl_congreso_linea tcl
- join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
- left join esq_conv_2020.tbl_congreso_equipo tce on tce.idregistro = tcl.id_responsable
- LEFT join esq_datos_personales.personal p ON p.idpersonal = tce.id_personal_sga
- LEFT join esq_conv_2020.tbl_personal_ext tpe ON tpe.idregistro = tce.id_personal_tmp
- where tc.id_convencion = 9
- order by tc.nombre, tcl.nombre_area
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement