Database Security Products (MOSC)

MOSC Banner

Problem on Select, pick one, skip others

edited Apr 9, 2010 6:45AM in Database Security Products (MOSC) 7 commentsAnswered
 Hi All,

Kindly need your help to solve my problem, i have task to query from database.

The  problem is, i have subquery that will pick granted role.

in subquery,  if user has more than one role, i should pick only one role from him.

my initial subquery is :

select granted_role, grantee from dba_role_privs where grantee in ( select username from v$session) On that query, if somone has more than one privilege, the data will show all of his role.

Can you help me how to make the correct query, so the data will only pick the first role that granted to the grantee and skip the other roles?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center