Ri-organizzazione degli script in sotto-cartelle

This commit is contained in:
Fabio Scotto di Santolo
2019-09-12 20:43:04 +02:00
parent e3a67446dc
commit 0e4018a47b
13 changed files with 0 additions and 0 deletions

28
statement/CASE-WHEN.sql Normal file
View File

@@ -0,0 +1,28 @@
DECLARE
V_CODFIDELITY VARCHAR2(20) := :CODFID;
V_RESIDENZA VARCHAR2(30);
BEGIN
SELECT
TRIM(PROV)
INTO
V_RESIDENZA
FROM
CORSOPLSQL.CLIENTI
WHERE
CODFIDELITY = V_CODFIDELITY;
DBMS_OUTPUT.PUT_LINE('Provincia: ' || V_RESIDENZA);
-- Espressioni case
CASE V_RESIDENZA
WHEN 'OR' THEN
DBMS_OUTPUT.PUT_LINE('Centro Sardegna');
WHEN 'SS' THEN
DBMS_OUTPUT.PUT_LINE('Nord Sardegna');
WHEN 'CA' THEN
DBMS_OUTPUT.PUT_LINE('Sud Sardegna');
ELSE
DBMS_OUTPUT.PUT_LINE('Non in Sardegna');
END CASE;
END;