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 the E's are excluded. 

All E's up to and including 'E%' will be included - e.g. 'E ', 'E!', 'E$'.
All A's before 'A%' will be EXcluded - e.g. 'A ', 'A!', 'A$'.

> I am no expert on SQL, but I think it is likely that BETWEEN does not 
> acknowledge the wildcards. 
>  
> Try: Surname between 'A' and 'Ezzzzzzzz' instead (or 'F') 

Or, depending on what characters are allowed, perhaps 'E~' might be better. 
Presumably, if you allow international characters, you would use something with 
an even larger character code than '~'.

-- 
Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming
http://www.trumphurst.com/



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

Reply via email to