Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT
- esq_distributivos.distribucion_academica.idmateria_unica,
- esq_distributivos.distribucion_academica.idpersonal,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.idregistro
- ELSE 0
- END AS idregistro,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.id_programa_analitico
- ELSE 0
- END AS id_programa_analitico,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.id_personal_aprueba
- ELSE 0
- END AS id_personal_aprueba,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.codigo
- ELSE ''
- END AS codigo,
- esq_ceac_planclase.tbl_syllabus.fecha_aprobacion,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.nombre_docente
- ELSE ''
- END AS nombre_docente,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.nombre_materia
- ELSE ''
- END AS nombre_materia,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.estado
- ELSE 'NA'
- END AS estado,
- CASE
- WHEN esq_ceac_planclase.tbl_syllabus.idregistro IS NOT NULL THEN esq_ceac_planclase.tbl_syllabus.creditos
- ELSE 0
- END AS creditos
- FROM
- esq_distributivos.distribucion_academica
- INNER JOIN esq_distributivos.departamento_periodo ON (esq_distributivos.distribucion_academica.iddepartamento_periodo = esq_distributivos.departamento_periodo.id_departamento_periodo)
- LEFT OUTER JOIN esq_ceac_planclase.tbl_syllabus ON (esq_distributivos.distribucion_academica.idmateria_unica = esq_ceac_planclase.tbl_syllabus.id_materia)
- AND (esq_distributivos.distribucion_academica.idpersonal = esq_ceac_planclase.tbl_syllabus.id_personal)
- AND (esq_distributivos.departamento_periodo.idperiodo = esq_ceac_planclase.tbl_syllabus.id_periodo_academico)
- WHERE
- esq_distributivos.departamento_periodo.idperiodo = 73 AND
- esq_distributivos.departamento_periodo.iddepartamento = 1
- ORDER BY
- esq_distributivos.distribucion_academica.idmateria_unica
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement