Hi All,
Using a global variable is a bad practise for all language. However, in my case, I have a PL/SQL package defines all constants, and I want to use them directly via SQL statement, for instance,
PACKAGE my_const
IS
DEFAULT_ZIP_CODE CONSTANT VARCHAR2(5) := '00000';
END;
And I cannot referrence this variable from my select statement as
SELECT my_const.DEFAULT_ZIP_CODE from dual;
I have to create a function via my package, as,
FUNCTION get_default_zip_code RETURN VARCHAR2
IS
BEGIN
RETURN DEFAULT_ZIP_CODE;
END;
and
SELECT my_const.get_default_zip_code from dual;
I don't want to create functions to referrence the default varaibles. Does anyone have any clues?
thanks
Edited by: user4184769 on Jul 19, 2010 8:36 AM