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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:41:38+00:00 2026-05-27T03:41:38+00:00

This is an Oracle question. I need to find the top 5 biggest values

  • 0

This is an Oracle question.

I need to find the top 5 biggest values in a series of records. Say I have 2000 records, and there is a column that holds number values in each record. I need to check this number field and only select the top 5 biggest.

So if I have these values in my number column

22
3
44
2
23
9
4
2
99

Then the following would be returned

22
44
23
9
99

I’m currently having to parse the number value from the field as it is a string. I parse it with the following

REGEXP_SUBSTR(SUBSTR(ADDITIONAL_INFO, 1 ,
              INSTR(ADDITIONAL_INFO, ',', 1,1)), '[0-9]+') "CELLS"

I’m thinking there might be looping and if else selection involved. If this were C# I could do this in a few minutes. But the Oracle syntax is throwing me off.

Please help.

  • 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-27T03:41:38+00:00Added an answer on May 27, 2026 at 3:41 am

    You could try:

    SELECT * FROM
        (SELECT ADDITIONAL_INFO FROM your_table
         ORDER BY to_number(ADDITIONAL_INFO) DESC) r
    WHERE rownum <= 5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are multiple questions about this same question but I couldn't find
This is a really dumb question. But I have a hard time with Oracle
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Timer.html The reason for this question is that I have a timer running at
This is a followup question of How to encode characters from Oracle to Xml?
This is mostly a data warehouse philosophy question. My project involves an Oracle forms
I have a table like this (Oracle, 10) Account Bookdate Amount 1 20080101 100
I have this table in an Oracle DB which has a primary key defined
the question is like this: there is a sorted list of n numbers. Given
So here's my question (i'm using Oracle SQL by the way) I have 3
I need to diagram an oracle database and I am hoping to find some

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.