Hi lists
can anybody post me to find alternative rows in a table.
1,3,5 ...
or 2,4,6
srinivas
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Tatireddy, Shrinivas (MED, Keane)
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858
For even numbered rows .
select col_1, col_2
from (select col_1, col_2, rownum rnum
from my_table)
where mod(rnum, 2) = 0
For odd numbered rows ...
select col_1, col_2
from (select col_1, col_2, rownum rnum
from my_table)
where mod(rnum, 2) 0
A from clause select is
select * from (
select rownum,a,b,c from table) x
where mod(x.rownum,2) = 1
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 5:35 PM
Hi lists
can anybody post me to find alternative rows in a table.
1,3,5
anybody post me to find alternative rows in a table.
1,3,5 ...
or 2,4,6
srinivas
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Tatireddy, Shrinivas (MED, Keane)
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051
San Diego
Hi Srini
SELECT * FROM Table
WHERE (rowid, 1)
IN ( select rowid , mod(rownum, 2) from Table )
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 9:05 PM
Hi lists
can anybody post me to find alternative rows in a table