Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using packaged constants in queries
You're welcome, Alexander!
All I could see from what you were going through was that storing your constants in a table and getting them out that way with simple selects that can be done in either SQL or PL/SQL seemed a lot less complicated; I am not criticizing your work or saying we could not make it work, but unless there was a compelling reason to store and retrieve constant variables (is that an oxymoron?) in code, in general, I do not think is a good practice, except as I say, if there are extraordinary reasons.
to grab variables out of your "constant variables" table, into PL/SQL, use a
SELECT INTO.... and then you are good to go with whatever constants.
Plus, if the gravimetric acceleration, the speed of light, or Pi ever change, you can update it in a table.!
:)
RSH.
"Alexander Miroshnikov" <alexander_miroshnikov_at_hotmail.com> wrote in message
news:400d3b626b64118fc0fb6b53631ad6e5.73752_at_mygate.mailgate.org...
> Thank you very much for your help.
>
> It seems that when PL/SQL looks at Oracle package it sees it as
> executable code plus a source of type definitions, session variables,
> etc. But when SQL looks at Oracle package it sees it only as executable
> code. Thus the only thing we can do with packages from SQL is to call
> packaged functions and procedures.
>
> Thanks again.
>
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Fri Mar 01 2002 - 12:13:28 CST
![]() |
![]() |