Advertisement
jzgeorge

asdsada

Apr 28th, 2017
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. -- View: esq_ceac_planclase.v_syllabus_materia_malla
  2.  
  3. -- DROP VIEW esq_ceac_planclase.v_syllabus_materia_malla;
  4.  
  5. CREATE OR REPLACE VIEW esq_ceac_planclase.v_syllabus_materia_malla AS
  6. SELECT row_number() OVER ()::numeric AS idregistro,
  7. tbl_syllabus.idregistro AS idsyllabus,
  8. tbl_syllabus.id_materia,
  9. tbl_syllabus.id_periodo_academico,
  10. tbl_syllabus.codigo,
  11. tbl_syllabus.tipo_materia,
  12. tbl_syllabus.tipo_syllabus,
  13. tbl_syllabus.fecha_creacion,
  14. tbl_syllabus.id_personal_aprueba,
  15. tbl_syllabus.estado,
  16. tbl_syllabus_docente_informacion.id_personal,
  17. tbl_syllabus_docente_informacion.email_institucional,
  18. tbl_syllabus_mallas.id_malla,
  19. tbl_syllabus_mallas.id_escuela,
  20. escuela.nombre AS nombreescuela,
  21. materia_unica.nombre AS nombremateria,
  22. malla_escuela.nombre AS nombremalla
  23. FROM esq_ceac_planclase.tbl_syllabus
  24. JOIN esq_ceac_planclase.tbl_syllabus_docente_informacion ON tbl_syllabus.idregistro = tbl_syllabus_docente_informacion.id_syllabus
  25. LEFT JOIN esq_ceac_planclase.tbl_syllabus_mallas ON tbl_syllabus.idregistro = tbl_syllabus_mallas.id_syllabus
  26. LEFT JOIN esq_inscripciones.escuela ON tbl_syllabus_mallas.id_escuela = escuela.idescuela
  27. LEFT JOIN esq_distributivos.materia_unica ON tbl_syllabus.id_materia = materia_unica.idmateria_unica
  28. JOIN esq_mallas.malla_escuela ON tbl_syllabus_mallas.id_malla = malla_escuela.idmalla;
  29.  
  30. ALTER TABLE esq_ceac_planclase.v_syllabus_materia_malla
  31. OWNER TO ceac_analitico;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement