Subject Re: [firebird-support] Varchar 32765 as result of substring?
Author Thomas Steinmaurer
Hi Björn,

> what should I expect as result data type of the following
> expression (4th column):
>
>
> select FIRST 10 "Id", "Vorname", "Name",
> SUBSTRING(
> CASE WHEN ("IsMonatUngueltig" = 1) THEN
> ' '||extract (year from "Geburtsdatum")
> ELSE
> CASE when ("IsTagUngueltig" = 1) THEN
> LPad(extract (month from "Geburtsdatum"),2,'0')||'.'||extract (year from "Geburtsdatum")
>
> ELSE
> LPad(extract (day from "Geburtsdatum"),2,'0')||'.'||LPad(extract (month from "Geburtsdatum"),2,'0')||'.'||extract (year from "Geburtsdatum")
>
> END
> END FROM 1 FOR 10) AS "Geburtsdatum"
> FROM RMV_PERSON
>
>
> I'd expect varchar(10) or something like that.
> Actual result is (according to IBExpert) varchar(32765)
>
> That would be no problem but there is limit for rowsizes....
>
> 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)?




--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/