I'm assuming that you're not running 9i.

You have to use dynamic SQL (DBMS_SQL or execute immediate) to run those functions in queries in the PL/SQL engine.