Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: LeanerHi,
I've looked through here and the docs and either my search patterns are bad, or it is not possible to do so: How can I count how many characters are in a field?
Background: Santander Bank has a sort code which starts 09. In some of our DBs, the developers (bless 'em) did not use the correct data type which is causing the first zero to disappear at input. This is causing all kinds of mischief and Santander is not the only bank with sort codes that start with a zero. The only way I see this being fixed is by counting how many characters that field contains as sort codes are six digits.
i.e.
if count.('sortCode') < 6 then
I've tried using 'left' to evaluate the string, but there are too many variables to assure I will catch all the bad sort codes.
Ta.