Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Selecting every other code.... why wont THIS work?

Selecting every other code.... why wont THIS work?

From: elziko <elziko_at_NOTSPAMMINGyahoo.co.uk>
Date: Mon, 3 Feb 2003 10:26:32 -0000
Message-ID: <3e3e43f6$0$12354$afc38c87@news.easynet.co.uk>


If I do the following:

SELECT testtime, MOD(rownum,2) FROM testdata

I get the following output:

0.0        1
0.1        0
0.2        1
0.3        0
0.4        1

and so on. So by my reckoning, in order to select only every OTHER row in this table I should be able to do:

SELECT testtime FROM testdata WHERE MOD(rownum,2) = 1

But it returns no records! I've obviously missed something here?!?

Cheers,

elziko Received on Mon Feb 03 2003 - 04:26:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US