Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION esq_ceac_planclase.f_concatenar_respuestas_unidad(p_idplanclase numeric, p_idunidad numeric)
- RETURNS text AS
- $BODY$
- DECLARE
- evaluacionjson text;
- BEGIN
- SELECT (('['::text || array_to_string(array_agg(regexp_replace(regexp_replace(tbl_plc_designacion_estudiante.json_evaluacion, ']'::text, ''::text, 'g'::text), '\['::text, ''::text, 'g'::text)), ','::text)) || ']'::text) into evaluacionjson
- FROM esq_ceac_planclase.tbl_plc_designacion_estudiante WHERE esq_ceac_planclase.tbl_plc_designacion_estudiante.idplanclase=p_idplanclase and
- esq_ceac_planclase.tbl_plc_designacion_estudiante.idunidad=p_idunidad;
- return evaluacionjson;
- END;
- $BODY$
- LANGUAGE plpgsql VOLATILE
- COST 100;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement