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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:10:54+00:00 2026-05-25T21:10:54+00:00

To clarify the question further… I have the following Table ORDERS_TAB with some example

  • 0

To clarify the question further…

I have the following Table ORDERS_TAB with some example information:

|Order| Launch_Date |
|  1  |   27-Sep-11 |
|  2  |   29-Sep-11 |
|  3  |   30-Sep-11 |
|  4  |   03-Oct-11 |
|  5  |   28-Oct-11 |
|  8  |   10-Oct-11 |
|  7  |   29-Sep-11 |

I want to select all orders that have a LAUNCH_DATE value within the next three available days including the current day. So, as today is 29-Sep-11 the three available dates from the table would be 29-Sep-11, 30-Sep-11 and 03-Oct-11. Thus the query would return the result:

|Order| Launch_Date |
|  2  |   29-Sep-11 |
|  3  |   30-Sep-11 |
|  4  |   03-Oct-11 |
|  7  |   29-Sep-11 |

So I assume I would need to check what the current date is in the system, search for this date or the next available one and then find the next two available dates after that.. the problem is I have no idea how to do this!

All I am looking for is a simple SELECT statement with some conditions but any help is much appreciated,

Thank-you. 🙂

  • 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-25T21:10:55+00:00Added an answer on May 25, 2026 at 9:10 pm
    SELECT
      *
    FROM
    (
      SELECT
        DENSE_RANK() OVER (ORDER BY Launch_Date) available_date_index,
        *
      FROM
        ORDERS_TAB
      WHERE
        Launch_Date >= TRUNC(Sysdate)
    )
    WHERE
      available_date_index <= 3
    

    EDIT As there is confusion about how DENSE_RANK() works, here is the OP’s example…

    |Order| Launch_Date |    Available_Date_Index
    |  1  |   27-Sep-11 | <excluded by WHERE clause>
    |  2  |   29-Sep-11 |             1
    |  3  |   30-Sep-11 |             2
    |  4  |   03-Oct-11 |             3
    |  5  |   28-Oct-11 |             5
    |  8  |   10-Oct-11 |             4
    |  7  |   29-Sep-11 |             1
    

    This means that the returned Orders will be 2,3,4,7. Exactly as described by the OP.

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

Sidebar

Related Questions

I have some questions about vector in STL to clarify..... Where are the objects
The question is pretty straightforward. To further clarify, what exactly is the difference between
To clarify my question :-) I want to have the best of both worlds.
UPDATED - please read further details below original question I have a select form
Just to clarify, ths isn't really a question, more some help for people like
I just want to clarify one thing. This is not a question on which
Apologies if this is a slightly noob question, but looking to clarify my thoughts
I'm not sure really how to ask that question.. hopefully my explanation will clarify:
Let me clarify my question, and the solution I'm looking for. I'm using wikispaces.com,
Edit: I've changed my question and code to clarify my question better I've got

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.