Subject | Re: [firebird-support] Finding the closest match |
---|---|
Author | Adomas Urbanavicius |
Post date | 2005-11-21T10:00:25Z |
select first 100 from tableX where name >= 'B'
order by name asc
Just not sure if there has be 'B' or 'B ' :)
Adomas
Carl Boshoff wrote:
order by name asc
Just not sure if there has be 'B' or 'B ' :)
Adomas
Carl Boshoff wrote:
>Hey ppl
>
>
>I do a normal SELECT like this:
> SELECT * FROM milliontest WHERE testid like 'A%' ORDER BY testid
>ASC;
>And it returns (for example) 100 records, because I have records starting
>with 'A' in the database.
>
>Now if I do the same select, but using 'B%', in that select it does not
>return anything, since there are no records starting with 'B'. The nearest
>match is a record starting with 'D'.
>
>
>How can I get the select statement to return the closest match after B?
>
>
>Thanks
>Carl Boshoff
>
>
>
>
>
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>