Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Select and Odd
Sun, Feb 10 2008 7:57 AMPermanent Link

Dieter Nagy
Hello.

In my database I want to find all the records where odd numbers.
How can I do this with SQL.

TIA
Dieter Nagy
Sun, Feb 10 2008 12:36 PMPermanent Link

"Robert"

"Dieter Nagy" <Dieter.Nagy@tele2.at> wrote in message
news:BF51FF9D-38A1-47EA-BF94-92457A8DA905@news.elevatesoft.com...
> Hello.
>
> In my database I want to find all the records where odd numbers.
> How can I do this with SQL.
>

If what you want is to select records where a certain field is odd, then the
following will do it

select * from table where field mod 2 = 1

if what you want is every other record, it gets a bit more complicated.

Robert

Sun, Feb 10 2008 1:42 PMPermanent Link

Dieter Nagy
"Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote:


Thanks Robert.

Dieter




"Dieter Nagy" <Dieter.Nagy@tele2.at> wrote in message
news:BF51FF9D-38A1-47EA-BF94-92457A8DA905@news.elevatesoft.com...
> Hello.
>
> In my database I want to find all the records where odd numbers.
> How can I do this with SQL.
>

If what you want is to select records where a certain field is odd, then the
following will do it

select * from table where field mod 2 = 1

if what you want is every other record, it gets a bit more complicated.

Robert

Image