Skip to content
Snippets Groups Projects
Commit 4b9e21ee authored by Anton Bagliy's avatar Anton Bagliy
Browse files

Merge branch 'issue346_recordbook_order' into develop

parents 62d02377 3832b894
Branches
No related merge requests found
DROP FUNCTION IF EXISTS public.student_getrecordbooks(pstudentid integer);
CREATE OR REPLACE FUNCTION public.student_getrecordbooks(pstudentid integer)
RETURNS TABLE("ID" integer, "ExternalID" character varying, "Degree" bachelor_master_specialist)
LANGUAGE sql
AS $function$
-- select * from Student_GetRecordBooks(
-- :pStudentID -- put the pStudentID parameter value instead of 'pStudentID' (INT)
--);
select
books."ID" as "ID",
books."ExternalID" as "ExternalID",
books."Degree" as "Degree"
from (
SELECT DISTINCT
view_students.RecordBookID AS "ID",
view_students.RecordBookNumber AS "ExternalID",
view_students."degree" as "Degree",
view_students.SemesterId
FROM view_students
WHERE view_students.StudentID = pStudentID
ORDER by view_students.SemesterId desc
) as books;
$function$
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment