Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_SQL Dynamically creating views.
Hi Rodger,
Here's a way to have a dynamic view:
Use package variable in your where clause of the view. Then before selecting the view, initialize it.
ex. create view daily_sales as select * from your_sales_tables where sales_date = package_x.global_variable_date; Before selecting the view... in a pl/sql or a C program initialyze it like package_x.global_variable_date = '1998-08-28'
then select * from daily_sales ;
will give you the sales of the '1998-08-28'.
Hope this help.
Yves.
yroy_at_sctr.net
Received on Tue Sep 01 1998 - 00:00:00 CDT
![]() |
![]() |