Since you mentioend the word "database", Here's another solution that would work with SQLite (Addresses is the table name and AdrLine is the column containing the street address):
SELECT * FROM Addresses ORDER BY CASE WHEN substr(AdrLine,1,2) IN ('N ','S ','E ','W ') THEN substr(AdrLine,3) ELSE AdrLine END; Pete lcSQL Software <http://www.lcsql.com> On Sat, May 12, 2012 at 8:17 PM, Jim Hurley <jhurley0...@sbcglobal.net>wrote: > Thanks Peter. But I live in a very conservative county. None of yer fancy > diagonals here. NW indeed! > > Actually it is the County election database, and a search reveals only N, > E, S, and W. > > I think I finally get the phrase "by .... of each". Live Code does pretty > much what I did, except I'm sure they don't use a bubble sort. > > Jim > > > > > > > Message: 2 > > Date: Sat, 12 May 2012 12:22:38 -0400 > > From: "Peter M. Brigham, MD" <pmb...@gmail.com> > > To: How to use LiveCode <use-livecode@lists.runrev.com> > > Subject: Re: Sort of a problem > > Message-ID: <50a823d6-005e-47de-9a05-4b7ba094e...@gmail.com> > > Content-Type: text/plain; charset=us-ascii > > > > If you have streets like "SW 34th St" you'll have a problem -- you > should probably adjust your pickStreet function: > > > > function pickStreet pName > > if word 1 of pName is among the words of "N S E W NE NW SE SW" then > > return word 2 to -1 of pName > > end if > > return pName > > end pickStreet > > > > -- Peter > > > > Peter M. Brigham > > pmb...@gmail.com > > http://home.comcast.net/~pmbrig > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode