Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: User dependened views
In article <3A02FF1A.4A61BB6B_at_gmx.de>,
Carsten Baeumchen <carsten.baeumchen_at_gmx.de> wrote:
> Hi there,
>
> I have got the following problem:
>
> I use some special type of views that are accessible to every user.
> Every user is able to open/read the view.
> Now I have the problem that when different user execute this view-sql
> the content is replaced by the new query conditions.
>
> i.e. User one opens the view with a certain "where" condition, then
user
> 2 does the same with another condition, then content 1 is replaced
> because of the same
> name of the view.
>
> My question: is there a way to store this view by a user dependet
view
> name : "user".ViewAccounts.
>
> The sql statement should be able to integrated the current logged
user
> name into the main view name. This must happen automatically.
> Maybe something like that "create or replace view
> 'username'.ViewAccounts ..."
>
> The result should look like
>
> Bert.ViewAccounts
> Peter.ViewAccounts
> DBA.ViewAccounts
> ....
>
> Thanks a lot
> Carsten
>
Carsten, I'm assuming here that you're creating the views "on the fly"
as the users log in? There *is* a user-dependent variable (called,
oddly enough, USER) that you can concatenate to your view names to
disambiguate them. Does that help?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 16 2000 - 18:23:27 CST
![]() |
![]() |