Adriano,

> On 28/11/2011 17:03, Leyne, Sean wrote:
> > Adriano,
> >
> >>> 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.
> > Then it seems that the reported case must be about a blob column, since a
> substring on a char or varchar column would not raise the error.  (I have
> asked the OP to confirm the column definition, since they did not include
> that detail).
> >
> >
> No. It happens with large varchar column. So it turns back to my
> question: can we describe a column with a length we know will fit and will
> have no side effects other than just being described different?

The length of Substring (if known at prepare) should set the maxlength of the 
output

The output of Substring( Char_32000 from 1 for 20) should be a Char(20) {or 
VarChar(20)}
The output of Substring( VarChar_32000 from 1 for 20) should be a VarChar(20)
The output of Substring( Blob from 1 for 20) should be a Blob

Whereas

The length of Substring (if *not known* at prepare) should set the maxlength of 
the output to the length of the source

The output of Substring( Char_32000 from 1 for :VarA) should be a Char(32000) 
{or VarChar(32000)}
The output of Substring( VarChar_32000 from 1 for :VarA) should be a 
VarChar(32000)
The output of Substring( Blob from 1 for :VarA) should be a Blob



------------------------------------------------------------------------------
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