Advertisement
Guest User

Untitled

a guest
Jul 6th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. insert into mig_pres_prof_cat
  2. select distinct df.id_comision as catedra,
  3.     df.id_docente as profesor,
  4.     case
  5.         when ad.id_funcion_tipo in (3,7,20, 22,23,25,57)  then 'A'
  6.         when ad.id_funcion_tipo in (4,8,10,11,12,13,14,17,24,28,29,31,33,35,37,38,39,40,41,42,43,44,46,51) then 'P'
  7.         when ad.id_funcion_tipo in (9,15,18,27,36) then 'T'
  8.         else  'P'
  9.     end as tipo,
  10.     ad.id_categoria as cargo,
  11.     ad.carga_horaria as carga_horaria,
  12.     case
  13.         when ad.bnr_viatico = 0 then 1
  14.         else 0
  15.     end as paga_no_remunerativo, --preguntar de donde sale esta informacion
  16.     0 as ctrl_presentismo, --preguntar donde sale esta informacion
  17.     r.numero as ordenanza,
  18.     0 as cant_clases_estimadas
  19. from cargos_funciones.docentes_funciones df
  20. inner join cargos_funciones.comisiones c on df.id_comision = c.id
  21. left outer join cargos_funciones.asignaciones_designaciones ad on ad.id_comision = df.id_comision and ad.id_docente = df.id_docente
  22. left outer join actos_administrativos.resoluciones r on ad.resolucion_funcion_nro::INTEGER=r.id
  23. where df.confirmada = true and c.anio_academico = 2017 and c.id_periodo_academico = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement