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 8782653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:37:17+00:00 2026-06-13T20:37:17+00:00

is there such thing in oracle like listunagg function? For example, if I have

  • 0

is there such thing in oracle like listunagg function? For example, if I have a data like:

user_id degree_fi degree_en degree_sv
3601464 3700 1600 2200
1020 100 0 0
3600520 100,3200,400 1300, 800, 3000 1400, 600, 1500
3600882 0 100 200

and I’d like to show data like this:

user_id degree_fi degree_en degree_sv
3601464 3700 1600 2200
1020 100 0 0
3600520 100 1300 1400
3600882 0 100 200
3600520 3200 800 600
3600520 400 3000 1500

I tried to find some function like opposite of listagg but couldn’t find any.

  • 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-13T20:37:19+00:00Added an answer on June 13, 2026 at 8:37 pm

    As @be here now has already noted in the comment Oracle doesn’t provide such a function. So as a quick workaround you could write similar query:

    with t1(user_id, degree_fi, degree_en, degree_sv) as
    (
      select 3601464, '3700', '1600', '2200' from dual union all
      select 1020   , '100' , '0'   , '0'    from dual union all
      select 3600520, '100,3200,400', '1300, 800, 3000', '1400, 600, 1500'  from dual union all
      select 3600882, '0',    '100',  '200'  from dual
    ),
    Occurence(ocr) as(
      select Level as ocr
        from (select max(greatest(regexp_count(degree_fi, '[^,]+')
                                 , regexp_count(degree_en, '[^,]+')
                                 , regexp_count(degree_sv, '[^,]+')
                                 )
                        ) mx
                from t1    
              ) 
        connect by level <= mx
    )
    select *
      from (
    select User_id
         , regexp_substr(degree_fi, '[^,]+', 1, o.ocr) as degree_fi
         , regexp_substr(degree_en, '[^,]+', 1, o.ocr) as degree_en
         , regexp_substr(degree_sv, '[^,]+', 1, o.ocr) as degree_sv
       from t1 t
      cross join Occurence o
    )
    where degree_fi is not null
      or degree_en is not null 
      or degree_sv is not null
    

    Result:

    User_Id   Degree_Fi  Degree_En  Degree_Sv
    ------------------------------------------------------------ 
    3601464   3700       1600       2200 
    1020      100        0          0 
    3600520   100        1300       1400 
    3600882   0          100        200 
    3600520   3200       800        600 
    3600520   400        3000       1500 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there such a thing? I know that I can hook my function on
Is there such a thing as a Memory profiler for Iphones apps? I'd like
There's such thing as __w64 in Visual C++ 9. I came across it while
Is there such a thing? It is the first time I encountered a practical
Is there such a thing? Maybe there should be, I don't think Microsoft built
Is there such a thing as an on load complete for images in iphone?
Is there such a thing as JspC in the Seam/JSF/Facelets world? I used the
Is there such a thing? I'm on windows and using the WinCacheGrind app and
Can I ship my application with compiled templates? I there such a thing at
If there were such a thing I would imagine the syntax to be something

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.