On 28/11/2011 16:22, Leyne, Sean wrote:
> Adriano,
>
>>> select  char_length( SUBSTRING(col1 from 1 for 20)) from tbl_test     
>>> returns
>> 20 so I was expecting index to work.
>>> workaround
>>> CREATE INDEX IDX1 ON tbl_test COMPUTED BY (CAST(SUBSTRING(col1
>> from 1
>>> for 20) as varchar(20)))
>>>
>> This issue depends if we're allowed to change SUBSTRING with constant
>> length to describe the result with that length instead of the value one, like
>> we do with *PAD.
>>
>> Accordingly to the standard, substring "should" be described as returning the
>> same type of the value.
> By "type" does the standard mean the basic data type as well as the length?
>
I mean the "max length". It always returns blob for blobs and varchar 
for others types.


Adriano


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to