Subject | Re: [ib-support] Expression evaluation not supported error - repost |
---|---|
Author | Helen Borrie |
Post date | 2002-10-24T07:00:34Z |
At 08:17 AM 24-10-02 +0200, you wrote:
Shouldn't this be
pz_numer COMPUTED BY
CAST(NR as varchar(18)) || '/' ||CAST(EXTRACT(YEAR FROM DATA_PZ) AS CHAR(4)) ;
Actually, I wouldn't even use a computed column for this because of the
variability of the varchar part. I'd create a varchar column of suitable
size and maintain it with Before Insert and Before Update triggers. This
would also mean you could index it.
create trigger.. for ...
active before insert | update as
begin
new.pz_numer = CAST(new.NR as varchar(18)) || '/' ||CAST(EXTRACT(YEAR
FROM new.DATA_PZ) AS CHAR(4));
end
This looks suspect too:
, count(R.kod_8) as ile
hth
heLen
>HelloCan only guess, but...
>
>Sorry, I know that it isn't polite to repost my question, but I'm desparate
>a little bit.
>Could someone explain the reason of getting 'expression evaluation not
>supported' error when dealing with computed fields.
>Details below.
> pz_numer COMPUTED BY ((CAST(NR||'/'||(EXTRACT(YEAR FROM DATA_PZ)) ASVARCHAR(10))));
Shouldn't this be
pz_numer COMPUTED BY
CAST(NR as varchar(18)) || '/' ||CAST(EXTRACT(YEAR FROM DATA_PZ) AS CHAR(4)) ;
Actually, I wouldn't even use a computed column for this because of the
variability of the varchar part. I'd create a varchar column of suitable
size and maintain it with Before Insert and Before Update triggers. This
would also mean you could index it.
create trigger.. for ...
active before insert | update as
begin
new.pz_numer = CAST(new.NR as varchar(18)) || '/' ||CAST(EXTRACT(YEAR
FROM new.DATA_PZ) AS CHAR(4));
end
This looks suspect too:
> > , cast(count(R.kod_8) as integer) as ileI think it it is invalid to try to cast an integer as an integer. Should be
, count(R.kod_8) as ile
hth
heLen