Hi,
I have a table with a varchar2 (80 char) column storing values 'sc51' through 'sc60'. When I run the following SQL I see all the values:

select vartest from vartest_tbl
where (upper(vartest) between upper('sc51') and upper('sc99') );

sc51
sc52
sc53
sc54
sc55
sc56
sc57
sc58
sc59
sc60

But when I run the following SQL I don't see any values:

select vartest from vartest_tbl
where (upper(vartest) between upper('sc51') and upper('sc100') );

And if I change the SQL to:

select vartest from vartest_tbl
where (upper(vartest) between upper('sc51') and upper('sc600') );

I see all the values again.

Using:

select vartest from vartest_tbl
where (upper(vartest) between upper('sc51') and upper('sc599') );

shows me values between 'sc51' - 'sc59' only.

Can you explain this behavior? What do I need to do to get the correct queryset every time?

Thank you.