From: Michael Dykman Date: November 4 2009 3:34pm Subject: Re: Alphabetical search to and from List-Archive: http://lists.mysql.com/mysql/219240 Message-Id: <814b9a820911040734o14ee497eo50073a9a35ad9b8a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Good point about that first position. Of course, the ending would need an interpretation according to the charset at hand. select * from country Name between 'F' and 'P\uffff\uffff\uffff\uffff\ufff= f' - md On Wed, Nov 4, 2009 at 10:26 AM, misiaQ wrote: > Hi, > > You're right on one hand. But on the another in some languages you have a > more characters after the Z letter. > Apart from that try this: > > select 'F' as test > union > select 'FAA' > order by test; > > and you'll see: > > test > --------- > F > FAA > > Regards, > m. > > -----Original Message----- > From: Michael Dykman [mailto:mdykman@stripped] > Sent: 04 November 2009 15:19 > To: Dave M G > Cc: mysql@stripped > Subject: Re: Alphabetical search to and from > > Haven't tried this myself, but would this not work while permitting > the index to engage? > > select * from country Name between 'FAAAAAAAAAA' and 'PZZZZZZZZZZ' > > On Wed, Nov 4, 2009 at 10:15 AM, misiaQ wrote: >> Try this: >> select * from country where LEFT(Name, 1) between 'F' and 'P'; >> >> Regards, >> m. >> >> -----Original Message----- >> From: Dave M G [mailto:dave@stripped] >> Sent: 04 November 2009 14:52 >> To: mysql@stripped >> Subject: Alphabetical search to and from >> >> MySQL, >> >> This should be a fairly simple question. >> >> I have a table with a bunch of people's names. I want to find people >> who's name begins within a certain range of characters. >> >> All names between F and P, for example. >> >> What SELECT statement would I use to do that? >> >> Thank you for any advice. >> >> -- >> Dave M G >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmisiaq@poczt= a.fm >> >> >> >> ---------------------------------------------------------------------- >> Konkurs: Wygrywaj nagrody z Pudzianem! >> Sprawd=BC >> http://link.interia.pl/f240e >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmai= l.com >> >> > > > > -- > =A0- michael dykman > =A0- mdykman@stripped > > "May you live every day of your life." > =A0 =A0Jonathan Swift > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmisiaq@poczta= .fm > > > > Tanie rozmowy telefoniczne! > Sprawdz >> http://link.interia.pl/f2410 > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmail= .com > > --=20 - michael dykman - mdykman@stripped "May you live every day of your life." Jonathan Swift