Advertisement
jzgeorge

new view

Apr 12th, 2017
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2. esq_ceac_planclase.tbl_syllabus.tipo_materia,
  3. esq_ceac_planclase.tbl_syllabus.id_periodo_academico,
  4.   esq_ceac_planclase.tbl_syllabus.codigo,
  5.   esq_distributivos.materia_unica.nombre AS nombremateria,
  6.   CONCAT (esq_ceac_planclase.tbl_syllabus_docente_informacion .apellido1, ' ',esq_ceac_planclase.tbl_syllabus_docente_informacion .apellido2, ' ',esq_ceac_planclase.tbl_syllabus_docente_informacion .nombres) AS nombredocente,
  7.   esq_ceac_planclase.tbl_syllabus_docente_informacion.titulo_cuarto_nivel,
  8.   esq_ceac_planclase.tbl_syllabus_mallas.id_escuela,
  9.   esq_ceac_planclase.tbl_syllabus_mu_departamentos.id_departamento,
  10.   (SELECT
  11. array_to_string(array_agg(CONCAT (bbl.autor,', ',bbl.titulo,', ',bbl.anio,'.')), '\n ' ::text) AS  bibliografia_b
  12. FROM
  13. esq_ceac_planclase.tbl_programas_bibliografias bbl
  14. WHERE
  15. bbl.idprograma = esq_ceac_planclase.tbl_syllabus.id_programa_analitico
  16. AND bbl.tipo LIKE '%B%'),
  17. (SELECT
  18. array_to_string(array_agg(CONCAT (bbl.autor,', ',bbl.titulo,', ',bbl.anio,'.')), '\n ' ::text) AS  bibliografia_c
  19. FROM
  20. esq_ceac_planclase.tbl_programas_bibliografias bbl
  21. WHERE
  22. bbl.idprograma = esq_ceac_planclase.tbl_syllabus.id_programa_analitico
  23. AND bbl.tipo LIKE '%C%')
  24. FROM
  25.   esq_ceac_planclase.tbl_syllabus
  26.   INNER JOIN esq_distributivos.materia_unica ON (esq_ceac_planclase.tbl_syllabus.id_materia = esq_distributivos.materia_unica.idmateria_unica)
  27.   INNER JOIN esq_ceac_planclase.tbl_syllabus_docente_informacion ON (esq_ceac_planclase.tbl_syllabus.idregistro = esq_ceac_planclase.tbl_syllabus_docente_informacion.id_syllabus)
  28.   LEFT OUTER JOIN esq_ceac_planclase.tbl_syllabus_mallas ON (esq_ceac_planclase.tbl_syllabus.idregistro = esq_ceac_planclase.tbl_syllabus_mallas.id_syllabus)
  29.   LEFT OUTER JOIN esq_ceac_planclase.tbl_syllabus_mu_departamentos ON (esq_ceac_planclase.tbl_syllabus.idregistro = esq_ceac_planclase.tbl_syllabus_mu_departamentos.id_syllabus)
  30. WHERE
  31.   esq_ceac_planclase.tbl_syllabus_docente_informacion.titulo_cuarto_nivel != ''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement