Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:03:40+00:00 2026-06-06T04:03:40+00:00

I have Hierarchical data. select lpad(‘ ‘, 4*(level-1))||NAME from from_sql where where_sql CONNECT BY

  • 0

I have Hierarchical data.

select lpad(' ', 4*(level-1))||NAME 
from from_sql 
where where_sql 
CONNECT BY PRIOR id = parent_id 
START WITH parent_id is null 
  • work, all right.

out:

la1
    la2
    la3
        la4
    la5
        la6
        la7
la8
    la9

i need:

1    la1
1.1        la2
1.2        la3
1.2.1            la4
1.3        la5
1.3.1            la6
1.3.2            la7
2    la8
2.1        la9

how to do numeration with point?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:03:42+00:00Added an answer on June 6, 2026 at 4:03 am

    Try this:

    SELECT SYS_CONNECT_BY_PATH(r, '.'), name
    FROM
      (SELECT rank() over (partition BY parent_id
                        ORDER BY id) r,
                    id,
                    name,
                    parent_id
      FROM from_sql 
     WHERE where_sql) t
       CONNECT BY
       PRIOR id = parent_id START WITH parent_id IS NULL
    

    here is a fiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a hierarchical data classes like public class MyNode { public string Name
I have a php script that takes hierarchical data from a mysql procedure and
I have a TreeView that allows users to select certain elements of hierarchical data
I have a hierarchical data structure with two similar sub-trees: Iteration: string Name string
Lets assume I have this sample data: | Name | ID | PARENT_ID |
I have got an array that contains data in hierarchical form such as: Level
I have a hierarchical data structure which I'm displaying in a webpage as a
I have a table containing hierarchical data. There are currently ~8 levels in this
I currently have a closure table used for hierarchical data that has 5 million
I am using Zend_Db_Select currently to retrieve hierarchical data from several joined tables. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.