Firstly my code

```
CREATE OR REPLACE FUNCTION exchangeRate(from_in VARCHAR2(5), to_in VARCHAR2(5)) RETURN NUMBER IS 
  exchange_rate NUMBER;
BEGIN
    CASE
        WHEN to = 'USD' THEN 
        CASE
            WHEN from = 'EUR' THEN exchange_rate := 25.49;
            ELSE exchange_rate := 1;
        END CASE;
        ELSE exchange_rate := 1;
    END CASE;
  RETURN exchange_rate;
END;

```

This is shorter version, i removed the adittional whens as they are identical (only different in currency and rates). However i do not understand the reason for this, i would ask for help with understanding the error.

```
CREATE OR REPLACE FUNCTION exchangeRate(from_in table.currency%TYPE, to_in table.currency%TYPE) RETURN table.price%TYPE IS 
  exchange_rate table.price%TYPE;
BEGIN
    CASE
        WHEN to = 'USD' THEN 
        CASE
            WHEN from = 'EUR' THEN exchange_rate := 25.49;
            ELSE exchange_rate := 1;
        END CASE;
        ELSE exchange_rate := 1;
    END CASE;
  RETURN exchange_rate;
END;

```

And as i am not sure what is wrong with that, i would also like to ask whether i can use `table.row%TYPE` to declare parameter and return type 

Edit: i only renamed it to "from" and "to" in here, i apologise for that, the original code had different names (which were bit too random)