Good afternoon
How to create a function. I need to make a selection from it.
Knowing the parameters the number of days on which the deposit is opened
The amount must be offered to the client as interest on the deposit.enter image description here
<code>
CREATE OR REPLACE FUNCTION DEPOSITRECOMMEN
(pDays NUMBER, --
pCurrencyName VARCHAR, --
pDepositSumStart NUMBER --
) RETURN VARCHAR IS
vPRC NUMBER;
vdepositSumEnd NUMBER;
BEGIN
IF pDays >= 30 THEN
SELECT d.prc
INTO vPRC
FORM depositrecommendations d
END IF;
RETURN '' || vPRC;
END;
</code>
<code>
CREATE OR REPLACE FUNCTION DEPOSITRECOMMEN
(pDays NUMBER, --
pCurrencyName VARCHAR, --
pDepositSumStart NUMBER --
) RETURN VARCHAR IS
vPRC NUMBER;
vdepositSumEnd NUMBER;
BEGIN
IF pDays >= 30 THEN
SELECT d.prc
INTO vPRC
FORM depositrecommendations d
END IF;
RETURN '' || vPRC;
END;
</code>
CREATE OR REPLACE FUNCTION DEPOSITRECOMMEN
(pDays NUMBER, --
pCurrencyName VARCHAR, --
pDepositSumStart NUMBER --
) RETURN VARCHAR IS
vPRC NUMBER;
vdepositSumEnd NUMBER;
BEGIN
IF pDays >= 30 THEN
SELECT d.prc
INTO vPRC
FORM depositrecommendations d
END IF;
RETURN '' || vPRC;
END;
New contributor
Джон Доу is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.