User-1051986203 posted
Do this way if you have table structure like this:-
create table reportssrs(quesID varchar(20),value int)
insert into reportssrs values('question id 1',1),('question id 1',2)
,('question id 1',3),('question id 1',4),('question id 1',5)
,('question id 2',1),('question id 2',2)
,('question id 2',3),('question id 2',4)
select * from reportssrs
quesID value
question id 1 1
question id 1 2
question id 1 3
question id 1 4
question id 1 5
question id 2 1
question id 2 2
question id 2 3
question id 2 4
while showing in report use this query:-
select Sno,value from(
select dense_rank() over (order by quesID ) as Sno,* from reportssrs
) h1
Sno value
1 1
1 2
1 3
1 4
1 5
2 1
2 2
2 3
2 4
make Sno to row group in reports then you will find same format in report as you mentioned in post like this:-
1 1
2
3
4
5
2 1
2
3
4