Subject | Varchar 32765 as result of substring? |
---|---|
Author | Björn Reimer |
Post date | 2009-03-20T16:05:09Z |
Hi all,
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?
--
Björn Reimer - RRZE
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?
--
Björn Reimer - RRZE