Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

kind of sequential query

MichaelSFeb 17 2007 — edited Jun 21 2007
Hello folks,

my requirement is: Given a number N (let's say 7 for this example) generate a query with following output:
SELECT A,B FROM some_query
/

A  B
-------
1  7
1  7
1  7
1  7
1  7
1  7
1  7
2  6
2  6
2  6
2  6
2  6
2  6
3  5
3  5
3  5
3  5
3  5
4  4
4  4
4  4
4  4
5  3
5  3
5  3
6  2
6  2
7  1

28 rows selected.
Any ideas?

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 18 2007
Added on Feb 17 2007
16 comments
3,422 views