Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to use of constant in a package?

Re: how to use of constant in a package?

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/08/09
Message-ID: <33EC35FF.1483@iol.ie>#1/1

Sandeep Patwardhan wrote:
>
> Hi,
> I have a stored package wherein I have defined all constants.
> How can I make use of this constant in where clause of select
> statement for my view.
> e.g I have a package declare_const and have a constant, x defined in
> it
> I want to use it as -
> create view test as
> select * from table_name
> where column = declare_const.x
>
> I would really be thankful if anyone could please solve this problem
> Thanks,
> Sandeep
> mail:patwardhan_at_logica.com

You should create functions in the package to return the value of each constant / variable. Provided they are created with the appropriate restrict_references pragmas, these can be referenced within SQL statements.

Within PL/SQL procedures, of course, the constants can be referenced directly.

HTH

-- 
Chrysalis

FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Sat Aug 09 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US