OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: grabbing even addresses?

From: ewen fortune (ewen.fortunegmail.com)
Date: Mon Feb 02 2009 - 12:34:13 CST


Hi Jason,

On Mon, Feb 2, 2009 at 7:27 PM, Jason Pruim <japruimraoset.com> wrote:
> Hello!
>
> I was wondering if something was possible, I have an excel file right now of
> US mailing addresses, and what I need to do is select all the odd numbered
> addresses on one road, is there an easy way I can do that from MySQL? the
> addresses could contain 3, 4 or 5 numbers per addresses such as:
>
> 123 Main
> 1232 Main
> 1233 Main
> 1234 Main
> 12345 Main
>
> and what I want out of those would be:
>
> 1232 Main
> 1234 Main
>
> Any ideas? Thanks for looking! :)

Not sure if this is the best way, but you could use mod() to determine
if the number is even or not.

http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_mod

Ewen

>
>
> --
> Jason Pruim
> japruimraoset.com
> 616.399.2355
>
>
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql