In ASE, the empty string is implemented as a single space. Therefore, in ASE, the empty string has length 1. In MS SQL Server, the empty string is really empty. In MS SQL Server, the empty string has length 0, as is to be expected.
When using functions like LTrim
, RTrim
, DataLength
, CharIndex
and so on, this difference in implementation can cause unexpected differences in behavior.