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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_SQL Dynamically creating views.

Re: DBMS_SQL Dynamically creating views.

From: Helmut Hahn <helmut.hahn_at_bitoek.uni-bayreuth.de>
Date: 1998/09/01
Message-ID: <35EBA939.1D322D10@bitoek.uni-bayreuth.de>#1/1

Yves Roy, IPA wrote:

> 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

I read this thread and your solution sounds very good (also for my problem). The only question is about the isolation in the package variable. Is it the same value for a session although another session changed the variable, but it is still used by the first session?

Helmut Received on Tue Sep 01 1998 - 00:00:00 CDT

Original text of this message

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