Main Tables Views Indexes Constraints Triggers Procedures Functions Packages Sanity check Index

ACS3 Data Model

Description Columns Query Constraints Triggers

SECTION_NEIGHBORS

Columns

NameTypeNullableInsertableUpdatableDeletableComment
SECTION_IDNUMBER(38)NYESYESYES 
PREV_SECTION_IDNUMBER(38)YNONONO 
NEXT_SECTION_IDNUMBER(38)YNONONO 

Query:

select  s0.section_id,
(select s1.section_id
 from   manual_sections s1
 where  s0.manual_id = s1.manual_id
 and    s1.sort_key  = (select max(s2.sort_key)
                        from   manual_sections s2
                        where  s0.manual_id = s2.manual_id
                        and    s0.sort_key  > s2.sort_key
                        and    s2.active_p  = 't'
                        and    s2.content_p = 't')) as prev_section_id,
(select s1.section_id
 from   manual_sections s1
 where  s0.manual_id = s1.manual_id
 and    s1.sort_key  = (select min(s2.sort_key)
                        from   manual_sections s2
                        where  s0.manual_id = s2.manual_id
                        and    s0.sort_key  < s2.sort_key
                        and    s2.active_p  = 't'
                        and    s2.content_p = 't')) as next_section_id
from    manual_sections s0


Generated by OraSchemaDoc, (c) Aram Kananov, 2002