Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
>From: "Mark D. Stock" <marks@west.co.za>
>X-Informix-List-Id: <news.36705>
>Peter Procenko wrote:
>> What is the easiest way to select only ODD or EVEN from a int field in a
>> select statement, via SQL ?
>For EVEN numbers:
> SELECT *
> FROM tables
> WHERE int_col/2 = ROUND(int_col/2)>[...]
That's a long-winded way of writing:
SELECT *
FROM Tables
WHERE MOD(int_col, 2) = 0; -- Or 1
Yours,
Jonathan Leffler (johnl@informix.com) #include <witticism.h>
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.