> I have a query with a between operator on a non-indexed varchar(30)
field – currently on FB 2.5 :
>
> … where MYFIELD between ’AHH00091/2017’ and ’AHH00141/2017’
>
> I would expect 51 records from 91 to 141 all ending with /2017 but
> surprisingly, records ending with /2016 or /2015, etc. also appear in
the resultset ( so I have to put other criteria e.g. and MYFIELD like
'%/2017' )
e.g.
WHERE MYFIELD SIMILAR TO 'AHH[0-9]{5}/2017'
AND SUBSTRING(MYFIELD FROM 4 FOR 5) BETWEEN '00091' AND '00141'
I.
------------------------------------
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/