>pStartCode = 'A' >pEndCode = 'Z' > >select * ; > from companytable ; > where ( companytable.code between pStartCode and padr(rtrim(pEndCode), len(companytable.code), 'z') ) >>
>pStartCode = 'A' >pEndCode = 'Z' > >select * ; > from companytable ; > where ( companytable.code between pStartCode and pEndCode + chr(255) ) >Z is not necessarily the last character in all languages - in mine, it's ® (z caron) which comes after Z in our alphabet.