Thursday, May 17, 2007

Get List of pages and subpages from SQL

This select statement will return the list of pages and subpages of a given page group, you need to pass the page_group id.



SELECT B.id, B.title, B.parentid, SYS_CONNECT_BY_PATH (B.title,'->') scbp
FROM portal.wwv_user_corners B
WHERE siteid = :p_site
AND type = 1
START WITH id = '1'
CONNECT BY PRIOR B.id = B.parentid
AND PRIOR siteid = B.siteid
ORDER BY 4;



Regards, Homer

1 comment:

Anonymous said...

Good Afternoon

Looking forward to your next post