Subject | Re: [firebird-support] Varchar 32765 as result of substring? |
---|---|
Author | Alexandre Benson Smith |
Post date | 2009-03-20T21:41:13Z |
Björn Reimer wrote:
something like this:
select cast(Substring(LPAD('ABC',10,'*') from 1 for 10) as varchar(10)), cast(Substring(LPAD('ABC',10,'*') from 1 for 10) as varchar(10))
FROM RDB$DATABASE;
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Hi again,Use substring to cut the "excess" and then cast it to the desired size,
>
>>> Any ideas how I can shorten the result inside a view?
>>>
>
>
>> So, have you tried to create a view and see if in both IBExpert and isql
>> the resulting field is reported as VARCHAR(32765)?
>>
>
> I'd expect that the following statement should work.
>
> But it doesn't:
>
> select LPAD('ABC',10,'*'), RPAD('ABC',10,'*')
> FROM RDB$DATABASE;
>
>
> Result:
> Dynamic SQL Error
> SQL error code = -204
> Implementation limit exceeded
> block size exceeds implementation restriction
>
> (Tested with Firebird 2.1.1, 2.1.2 RC2 and 2.1.2 latest snapshot)
>
>
>
>
>
>
something like this:
select cast(Substring(LPAD('ABC',10,'*') from 1 for 10) as varchar(10)), cast(Substring(LPAD('ABC',10,'*') from 1 for 10) as varchar(10))
FROM RDB$DATABASE;
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br