Re: Views inside views, execution plan & external WHERE clause

From: Jan <janik_at_pobox.sk>
Date: 1 Jul 2003 05:32:58 -0700
Message-ID: <81511301.0307010432.6bf03a85_at_posting.google.com>


You want to:

  1. Filter complex data
  2. Join single results

and it does:    

  1. Join complex data [Quoted]
  2. Filter complex result

You can create a package with some global variable, e.g.:

 gv_employee_id NUMBER

and Function  

 Get_Employee_ID
  Return gv_employe_id;

and a procedure

 Set_Employee_ID (p_value IN NUMBER)

In your query, view, you could have a filter in the "deepest" WHERE:

...
[Quoted]  WHERE employe_id=(SELECT My_Package.Get_Employee_ID FROM DUAL)

Before you execute the query you just set employee id via

Set_Employee_ID

so it does what you want:

  1. Filter complex data
  2. Join single results

Jan Received on Tue Jul 01 2003 - 14:32:58 CEST

Original text of this message