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 between A and D, rather than the complete Surname being within those limits, or set the upper limit high enough. See the example below.

HTH,

Gerry
-----------------------------------------------------

$ sqlite3
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> create table a(a);
sqlite> insert into a values("A");
sqlite> insert into a values("D");
sqlite> insert into a values("Da");
sqlite> select * from A where a between 'A%' and 'D%';
D
sqlite> select * from A where a between 'A' and 'D%';
A
D
sqlite> select * from A where a between 'A' and 'D';
A
D
sqlite> select * from A where a between 'A' and 'Dzzz';
A
D
Da


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to