Thursday, January 18, 2007

How to identify users who have already had a dashboard distributed to them?

SELECT (u.first_name ' ' u.last_name)FULL_NAME, u.username USERNAME, u.user_id USER_ID, u.email_address Email, p.title Page_Title
FROM KNTA_USERS u, knta_user_security us, DSH_PAGES p, DSH_USER_PAGES up
WHERE ((u.end_date is NULL) OR (u.end_date > sysdate))
AND u.user_id=us.user_id -- joining the rows
AND up.page_id=p.page_id (+)
AND up.user_id=u.user_id -- joining the rows
AND p.title Page_Title = 'Change'
AND p.title = 'Change'GROUP BY p.title, u.user_id, u.username, u.first_name, u.last_name, u.email_address, p.title
Order by Username

0 Comments:

Post a Comment

<< Home