How can I use a package variable in a simple SELECT query statement in Oracle?
Something like
SELECT * FROM MyTable WHERE TypeId = MyPackage.MY_TYPE
No, you aren'e allowed to do that. You would need to provide a function that returns the value and then use that in the SQL:
SELECT * FROM MyTable WHERE TypeId = MyPackage.FUN_MY_TYPE