When I execute:
SELECT some_fields
FROM some_table
WHERE some_other_field BETWEEN '20130901' AND '20131131'
I get Error (247) Arithmetic overflow during implicit conversion of VARCHAR value '20131131' to SMALLDATETIME field.**
But when I execute:
SELECT some_field
FROM some_table
WHERE some_other_field BETWEEN '20130901' AND '20131130'
no complains. (Sybase 15.7.0)