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.

Convert row range into no of columns

790791Apr 25 2011 — edited Apr 25 2011
Dear All,

I have a table i.e tab_name that consist of four columns

c1 number, c2 varchar2(25) , c3 number, c4 number

create table tab_name
(c1 number,
c2 varchar2(25),
c3 number,
c4 number));

record into tab_name as follows

insert into tab_name
(1,'A1',10,15);
insert into tab_name
(2,'A2',35,40);


select * from tab_name

c1 c2 c3 c4
--- --- ---- ----
1 A1 10 15
2 A2 35 40




I want to create a query that display the data in the following format that make range difference c4 - c3
and display total no of column is equal to c4-c3 difference

1 A1 10
1 A1 11
1 A1 12
1 A1 13
1 A1 14
1 A1 15
2 B1 35
2 B1 36
2 B1 37
2 B1 38
2 B1 39
2 B1 40

Any body have a idea how to display this record from query

Thanks in advance

Regards,

Saeeed ul haq

Comments

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

Post Details

Locked on May 23 2011
Added on Apr 25 2011
3 comments
1,185 views