Re: ODD vs EVEN in select
Posted in 1997
Nils Myklebust — — source: Informix-list mailing list archive (1991-1998)
The following works fine on Informix OnLine ver. 7.10.UC1:
select intcolumn
from tablename
where mod(intcolumn,2) = 0
for even numbers. Replacing the 0 with 1 gives odd numbers.
"Peter Procenko" <mmi@fox.nstn.ca> wrote:
:What is the easiest way to select only ODD or EVEN from a int field in a
:select statement, via SQL ?
:
:Any help would be appreciated
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org