==========================================================
Code posted is very inconsistent.
Uppercase, lowercase, schema names missing.
Prefixes are inconsistent - sometimes "Uf_", othertimes "fn_"
select * is naughty unless you need the full result set...
When using the "EXISTS"...