SQL Language (MOSC)

MOSC Banner

Is there an analytic to compute steps between two numbers?

edited Dec 11, 2014 10:03AM in SQL Language (MOSC) 5 commentsAnswered

I have a starting value, and end value, and an interval and want to write a query that will return all the values in between the start and end, incremented by the interval value.

For example, sample columns in the table include:

Start:   2.00

End:    6.00

Interval:  .50

Based on those columns in a row in a table, I want SQL to return the following rows:

2.00

2.50

3.00

3.50

4.00

4.50

5.00

5.50

6.00

It seems to me there should be an analytic function to do this but I haven't been able to locate one.  MODEL seems to be the closest, but I couldn't find any relevant examples to help me construct it properly.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center