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

RHNPAIDORGS

DDL script

Columns

NameTypeNullableInsertableUpdatableDeletableComment
ORG_IDNUMBER(38)YNONONO 

Query:

Legend: comment string keyword reserved word operator
select	org_id
from	rhnServerGroup
where	group_type = lookup_sg_type('enterprise_entitled')
	and NVL(max_members,1) > 0
union all
select	sg.org_id
from	rhnServerGroup sg
where	sg.group_type = lookup_sg_type('sw_mgr_entitled')
	and NVL(sg.max_members,1) > 0
    and not exists (
        select 1
        from
            rhnDemoOrgs do
        where
            do.org_id = sg.org_id
            and sg.max_members = 1
    )
union all
select	sg.org_id
from	rhnServerGroup sg
where	group_type = lookup_sg_type('provisioning_entitled')
	and NVL(sg.max_members,2) > 1