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;
