On Wed, 2006-08-30 at 13:33 +0200, Arjen Markus wrote: > Roger wrote: > > >On Wed, 2006-08-30 at 12:03 +0100, Martin Jenkins wrote: > > > > > >>Roger wrote: > >> > >> > >>>I have a question. > >>> > >>>I trying to write a query as follows > >>> > >>>Select * > >>>>From People > >>>Where Surname Between 'A%' and 'E%' > >>>Order by UPPER(Surname); > >>> > >>>Now the problem i have is that i get only the Surnames from A up to D > >>>and the E's are excluded. > >>> > >>>Can anyone help me out, i am writing a web based application. > >>> > >>> > >>> > >>How about: > >> > >> Select * > >> From People > >> Where Surname Between 'A%' and 'F%' ' <--- s/E/F/ > >> Order by UPPER(Surname); > >> > >> > >Thanks for the response guys but then my problem comes when i try and > >query a range between T and Z i tried to make it query between T to A > >but got no result. Anyway i will have to add a constraint in my PHP code > >for T to Z. > > > > > Well, the character after 'Z' is 'a' in the ASCII table. You could try: > BETWEEN 'Z' and 'a' Oh! Thank you. Thank you. I feel kinda silly because i thought about the ASCII table.
It works now thanks. But is this a Code design issue because Between A and D is supposed to be inclusive. > > Regards, > > Arjen > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------