Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FUNCTION: public.fn_view_hr_pelamar_data_pribadi_pertanyaan(character varying, character varying)
- -- DROP FUNCTION public.fn_view_hr_pelamar_data_pribadi_pertanyaan(character varying, character varying);
- CREATE OR REPLACE FUNCTION public.fn_view_hr_pelamar_data_pribadi_pertanyaan(
- character varying,
- character varying)
- RETURNS SETOF record
- LANGUAGE 'plpgsql'
- COST 100
- VOLATILE PARALLEL UNSAFE
- ROWS 1000
- AS $BODY$
- declare
- v_nik alias for $1;
- v_kd_pertanyaan alias for $2;
- rcd record;
- begin
- for rcd in
- select nik,kode_pertanyaan,nama_pertanyaan,jawaban,jawaban_detail
- from hr_pelamar_pertanyaan_hasil
- where nik=v_nik and active=true and kode_pertanyaan=v_kd_pertanyaan
- loop
- return next rcd;
- end loop;
- /*
- select * from fn_view_hr_pelamar_data_pribadi_pertanyaan ('1671061001970009','') as (
- nik varchar,kode_pertanyaan varchar,nama_pertanyaan text,jawaban varchar,jawaban_detail text)
- */
- end
- $BODY$;
- ALTER FUNCTION public.fn_view_hr_pelamar_data_pribadi_pertanyaan(character varying, character varying)
- OWNER TO postgres;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement