Re: grabbing even addresses?

2009-02-02 Thread ewen fortune
Hi Jason, On Mon, Feb 2, 2009 at 7:27 PM, Jason Pruim japr...@raoset.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

Re: grabbing even addresses?

2009-02-02 Thread Christoph Boget
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:

RE: grabbing even addresses?

2009-02-02 Thread Kralidis,Tom [Ontario]
-Original Message- From: Jason Pruim [mailto:japr...@raoset.com] Sent: Monday, 02 February 2009 13:27 To: mysql@lists.mysql.com Subject: grabbing even addresses? Hello! I was wondering if something was possible, I have an excel file right now of US mailing addresses, and

RE: grabbing even addresses?

2009-02-02 Thread Martin Gainty
Jason try select ADDRESS FROM FUBAR_TABLE WHERE MOD(TO_ NUMBER(SUBSTR(ADDRESS,1,instr(ADDRESS,' ',1))),2) =0; SUBSTR(ADDRESS,1,INSTR(ADDRESS,'',1)) 1232 Main 1234 Main HTH Martin

Re: grabbing even addresses?

2009-02-02 Thread Daniel Brown
On Mon, Feb 2, 2009 at 13:43, Martin Gainty mgai...@hotmail.com wrote: select ADDRESS FROM FUBAR_TABLE WHERE MOD(TO_ NUMBER(SUBSTR(ADDRESS,1,instr(ADDRESS,' ',1))),2) =0; That hit the nail right on the head. That was the same thing I was going to suggest, Martin. I think people tend to

Re: grabbing even addresses?

2009-02-02 Thread Jason Pruim
On Feb 2, 2009, at 1:41 PM, Christoph Boget wrote: 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

RE: grabbing even addresses?

2009-02-02 Thread Jerry Schwartz
Why use a cannon on a gnat? Your data is already in an Excel spreadsheet, so why not use Excel to do this? =ISODD(LEFT(A1,SEARCH( ,A1)-1)) Will be true if the street number is odd; then you can just filter on that column to select the TRUE rows, and copy them to wherever you need them.