Subject Re: [firebird-support] SQL script for returning the length of a datafield
Author Helen Borrie
At 10:57 PM 13/11/2009, you wrote:
>> > If I want to varify of there are any stock codes that are not 16
>> characters long, what script would I use?
>> >
>> > select stockcode
>> > from stock
>> > where??
>>
>> stockcode containing ' '
>
>I'd go for:
>where char_length(stockcode) <> 16

Won't work for a char(16) though. It's always 16 characters long, with significant trailing blanks on any non-null values that are shorter than 16.

./heLen