Hi ,
I am trying to get the following output in a select query
1
1
1
1
2
2
2
2
3
3
3
3
like wise for every four records the counts need to tbe increased.
Printable View
Hi ,
I am trying to get the following output in a select query
1
1
1
1
2
2
2
2
3
3
3
3
like wise for every four records the counts need to tbe increased.
I need you to put assisted by Gandolf989 and my dog's
picture on your homework assignment. ;)
Welcome to the wonderful world of MOD!!! :D
Code:SYS@rdbadb01 AS SYSDBA> select mynum from (
2 select MOD(rownum, 3)+1 mynum
3 from all_objects where rownum<13 )
4 order by 1;
MYNUM
----------
1
1
1
1
2
2
2
2
3
3
3
3
12 rows selected.
Elapsed: 00:00:00.17