Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to use of constant in a package?
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
![]() |
![]() |