Is it possible to CAST to a type within a package? For example:
CAST(v_variable AS Mypackage.type)
I know CAST states the ability to cast to built-in types but I was wondering if this was possible. I'm interested in this approach because I prefer keeping my utilities in one package instead of having a separate TYPE object.
Thanks!
No. CAST() is a SQL function so we can only use it with SQL types. This means we cannot use it with types we have declared in a PL/SQL package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With