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: Janek Metsallik <jan_at_abs.ee>
Date: 1997/08/11
Message-ID: <33EED2A8.2EE0DF38@abs.ee>#1/1

Hi Sandeep,

> 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

You cannot use PL/SQL constants in SQL. You can add functions to your package to return these constants. Don't forget PRAGMA RESTRICT_REFERENCES(function_name,WNDS,RNDS,WNPS) (check the WNXX and RNXX constants from reference), othervise you still do not have possibility to use the functions in SQL.

Regards,
Jan Received on Mon Aug 11 1997 - 00:00:00 CDT

Original text of this message

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