Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CHALLENGING:: Dynamic OR Session specific Views. Possible?
On 19 May 2005 13:36:00 -0700, vistav20_at_yahoo.com wrote:
>Hi,
>
>Is it possible to create a view or a version of data accessible through
>same object name (table or view), which returns different values for
>different sessions?
>
>Here is what I am trying to do:
>
>I need to create a view with a different underlying query each time it
>is accessed. But I still need it to behave like a static object so I
>could use it to link with an external tool (so, it's name and structure
>etc will not change, just the underlying query and it's where clause
>willl change). To make matters more complex, the query would be
>different for different people logged in, hence the SESSION SPECIFIC
>contstraint.
>
>Any ideas?
>
>thanks much,
>Mark
I'm not exactly sure what you're trying to do but:
You could use a view and sys_context variables. You could create a pipelined function.
Either way, the STRUCTURE must remain the same but the way the execute can change.
More info with DB version and more detaield requirements might help.
Thanks,
Lewis
Author, ItToolBox Blog: An Expert's Guide to Oracle http://blogs.ittoolbox.com/oracle/guide/
Topic Editor, Suite101.com: Oracle Database http://www.suite101.com/welcome.cfm/oracle
Sign up for courses here:
http://www.suite101.com/suiteu/default.cfm/416752