Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select tc.nombre as congreso, tcl.nombre_area as tematica, tp.tema ,
- case when tpa.id_personal_sga is null
- then concat(tpe.nombres,' ', tpe.apellido1, ' ', tpe.apellido2)
- else concat(p.nombres,' ', p.apellido1, ' ', p.apellido2)
- end as autor,
- case when tpa.id_personal_sga is null
- then tpe.correo
- else p.correo_personal_institucional
- end as correo, tce.descripcion as estado
- from esq_conv_2020.tbl_ponencias tp
- join esq_conv_2020.tbl_congreso_linea tcl on tcl.idregistro = tp.id_congreso_linea
- join esq_conv_2020.tbl_congreso tc on tc.idregistro = tcl.id_congreso
- join esq_conv_2020.tbl_ponencias_autores tpa on tpa.id_ponencia = tp.idregistro
- join esq_conv_2020.tbl_convencion_estado tce on tce.idregistro = tp.id_estado
- left join esq_datos_personales.personal p on p.idpersonal = tpa.id_personal_sga
- left join esq_conv_2020.tbl_personal_ext tpe on tpe.idregistro = tpa.id_personal_tmp
- where tc.idregistro = 94
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement