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

  • SEARCH
  • Home
  • 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 3237552
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:45:07+00:00 2026-05-17T17:45:07+00:00

I’ve got some help turning my table of the sort: Col 23 25 15

  • 0

I’ve got some help turning my table of the sort:

Col
23
25
15
53
...

into something like 23,25,15,53...

The query that does it is

SELECT max(ltrim(sys_connect_by_path(flow_run_id, ','), ','))
FROM
    (select flow_run_id, rownum rn
    from table
    where CREATED_DATE < sysdate - 32
    and flow_id = 3
    order by 1 desc)
START WITH rn = 1
CONNECT BY PRIOR rn = rn - 1

(this beaulty was given by Michael in here)

My current problem is that the result is too long (ORA-01489 over the 4k chars from varchar2). I’m still learning about these sys_connected_by_path so I’d need some help sorting this. How could I make this query return me multiple rows instead of one super long line? i.e.:

Instead of

419,1,2,3,411,418,4,415,887,413,414,201,888,890,401,417,610,412,416,5,6,922,1080,1422,1423,1411,1412,1413,1414,1415,1416,1417,1418,1419,1964,2217,1636,2037,1988,1970,2038,1989,2000,2040,1993,2043,1994,2001,2044,1658,1995,2045,2224,1996,2019,1678,1997,2022,2201,1680,2219,2024,2207,1677,2209,2220,1959,2211,1961,2026,2212,1962,2028,2215,1675,1676,2035,2216,1986,1963,2017,1983,1935,2002,2018,1985,1936,2003,2020,2032,1937,2004,2021,2033,1938,1943,2023,2034,1939,1944,2025,2225,1941,1950,2027,2036,1942,1955,2029,2041,1945,1956,2030,2227,1946,1957,2031,2039,1947,2005,1974,2042,1948,2006,1976,2228,1949,2007,1978,1951,2009,1979,1929,1952,2012,1980,1931,1953,2013,1981,1933,1954,2015,2334,2350,2311,2239,2240,2241,2242,2245,2246,2249,2250,2336,2312,2008,2010,2011,2014,2251,2253,2016,2243,2244,2247,2351,2248,(...)

get

419,1,2,3,411,418,4,415,887,413,414,201,888,890,401,417,610,412,416,5,6,922,1080
1423,1411,1412,1413,1414,1415,1416,1417,1418,1419,1964,2217,1636,2037,1988,1970,2038
2000,2040,1993,2043,1994,2001,2044,1658,1995,2045,2224,1996,2019,1678,1997,2022,2201
(...)

Any tips?

Thanks!

f.

  • 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-05-17T17:45:07+00:00Added an answer on May 17, 2026 at 5:45 pm

    the following query will cut your big string in parts:

    SQL> SELECT root_rn, MAX(concat)
      2    FROM (SELECT connect_by_root(rn) root_rn,
      3                 ltrim(sys_connect_by_path(flow_run_id, ','), ',') concat
      4             FROM (SELECT flow_run_id, rownum rn
      5                      FROM (SELECT round(dbms_random.VALUE(1, 10000))
      6                                    AS flow_run_id
      7                              FROM dual
      8                           CONNECT BY ROWNUM <= 2000)
      9                     ORDER BY 1 DESC)
     10            START WITH MOD(rn, 10) = 1
     11           CONNECT BY PRIOR rn = rn - 1
     12                  AND MOD(rn, 10) != 1)
     13   GROUP BY root_rn
     14   ORDER BY root_rn;
    
       ROOT_RN MAX(CONCAT)
    ---------- -------------------------------------------------------------------
             1 654,6710,5297,5481,5085,2793,7646,9170,1051,2387
            11 1882,8285,5430,4928,267,3779,3843,1151,3085,1446
            21 4721,6087,6755,9904,805,2776,4633,2772,7785,5818
            31 5189,5307,6481,2099,3832,9788,5970,8068,6605,3904
            41 53,7013,1314,7717,9320,7069,907,5367,5013,7637
            51 3903,2318,2611,7954,5751,5598,6148,6555,9724,984
           [...]
    

    You can replace “10” with a bigger number if you want more elements on each row.

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

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.