Re: [sqlite] Using Between in SQL

2006-08-30 Thread Gerry Snyder
Roger wrote: But is this a Code design issue because Between A and D is supposed to be inclusive. It is. Any Surname which consists of the single character "D" will be included. Which is just what you told sqlite to check for. You need to check for the first char of the name being betwe

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Nikki Locke
Arjen Markus 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

Re: [sqlite] Using Between in SQL

2006-08-30 Thread drh
Roger <[EMAIL PROTECTED]> 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. > Wh

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Roger
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 Surn

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Martin Jenkins
Arjen Markus wrote: Well, the character after 'Z' is 'a' in the ASCII table. You could try: BETWEEN 'Z' and 'a' Not quite. It's "XYZ[\]^_`abc". Martin - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Martin Jenkins
Roger wrote: 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. I saw that coming, but you didn't ask about that bit. ;)

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Arjen Markus
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

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Roger
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

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Arjen Markus
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

Re: [sqlite] Using Between in SQL

2006-08-30 Thread Martin Jenkins
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 b

[sqlite] Using Between in SQL

2006-08-30 Thread Roger
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