Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Description Columns Query Constraints Triggers

RHNUSERRECEIVENOTIFICATIONS

DDL script

Columns

NameTypeNullableInsertableUpdatableDeletableComment
ORG_IDNUMBER(38)NNONONO 
USER_IDNUMBER(38)NNONONO 
SERVER_IDNUMBER(38)NNONONO 

Query:

Legend: comment string keyword reserved word operator
select wc.org_id, usp.user_id, usp.server_id
    from rhnUserServerPerms usp
    left join rhnWebContactDisabled wcd
        on usp.user_id = wcd.id
    join web_contact wc
        on usp.user_id = wc.id
    join rhnUserInfo ui
        on usp.user_id = ui.user_id
        and ui.email_notify = 1
    join web_user_personal_info upi
        on usp.user_id = upi.web_user_id
        and upi.email is not null
    left join rhnUserServerPrefs uspr
        on uspr.server_id = usp.server_id
        and usp.user_id = uspr.user_id
        and uspr.name = 'receive_notifications'
        and value='0'
    where uspr.server_id is null
    and wcd.id is null