List:General Discussion« Previous MessageNext Message »
From:Tom [Ontario] Kralidis Date:February 2 2009 6:43pm
Subject:RE: grabbing even addresses?
View as plain text  
 

> -----Original Message-----
> From: Jason Pruim [mailto:japruim@stripped] 
> Sent: Monday, 02 February 2009 13:27
> To: mysql@stripped
> Subject: grabbing even addresses?
> 
> 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! :)
> 

If this is in excel, perhaps you'd want to pre-process this before it
gets to MySQL?  e.g., in python:

isodd = int(address.split(" ")[0]) % 2

In general, you have to split the string, and test the numerical value
(modulo).

..Tom


Thread
grabbing even addresses?Jason Pruim2 Feb
  • Re: grabbing even addresses?ewen fortune2 Feb
  • Re: grabbing even addresses?Christoph Boget2 Feb
    • Re: grabbing even addresses?Jason Pruim2 Feb
  • RE: grabbing even addresses?Tom [Ontario] Kralidis2 Feb
  • RE: grabbing even addresses?Martin Gainty2 Feb
    • Re: grabbing even addresses?Daniel Brown2 Feb
  • RE: grabbing even addresses?Jerry Schwartz2 Feb