SQL Language (MOSC)

MOSC Banner

Connect by prior output in seperate columns

edited Aug 9, 2013 3:37AM in SQL Language (MOSC) 3 commentsAnswered
Hi

My customer needs organization hierarchy report output in separate columns. I amusing following query to generate sql output to create sql report in Oracle EBS.

Customer needs first column split into separate columns.

SELECT lpad(' ' ,level*2)||organization_code org_code ,description,organization_code,parent_org_codeFROM bpadmin.organizationSTARTWITH organization_code between NVL(p_from_org,'TOPU') and NVL(p_to_org,'TOPU')CONNECTBYPRIOR organization_code = parent_org_codeORDER

BY bpadmin.sort_new_orgs ( bpadmin.organization.organization_code )

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center