I need to update the STATUS field of my CLIENT_REQUEST_APP table when the CREDIT field = 'Y' then STATUS = 'GATEKEEPER'
So far I have this but how to integrate the UPDATE
DECLARE
:P2_CLIENT_ID := l_client_id;
BEGIN
SELECT CREDIT FROM CLIENT_REQUEST_APP
WHERE CLIENT_REQUEST_ID = l_client_id;
IF CREDIT = 'Y' THEN STATUS = 'REQUEST'; ---quiero actualizar el campo status de la tabla CLIENT_REQUEST_APP
ELSE STATUS = 'GATEKEEPER';
END IF;
END;
To update a field in an SQL DB, the UPDATE statement must be used like this:
I hope it works for you!!