From 5e608db6448a6b55fb1fc8a536a641a9667332d3 Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Sat, 3 Jun 2023 08:28:43 +0000 Subject: [PATCH] feat: add client id to getLastBookings --- SQL/PLSQL.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SQL/PLSQL.sql b/SQL/PLSQL.sql index eba2ef9..cdfe014 100644 --- a/SQL/PLSQL.sql +++ b/SQL/PLSQL.sql @@ -30,9 +30,9 @@ BEGIN return finalclerkid; END; -CREATE OR REPLACE PROCEDURE getLastBookings(months IN NUMBER) +CREATE OR REPLACE PROCEDURE getLastBookings(months IN NUMBER, clientz in NUMBER) IS - CURSOR bookingsCursor IS SELECT BOOKINGID FROM BOOKING WHERE ARRIVALDATE >= ADD_MONTHS(SYSDATE,-months); + CURSOR bookingsCursor IS SELECT BOOKINGID FROM BOOKING WHERE ARRIVALDATE >= ADD_MONTHS(SYSDATE,-months) AND clientId = clientz; BEGIN FOR booking IN bookingsCursor