Advertisement
jzgeorge

v_syllabus_materia_malla

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