Subject | Expression evaluation not supported error |
---|---|
Author | Marcin Bury |
Post date | 2002-10-23T06:34:41Z |
Hi List,
I have 3 tables:
MGP_ROLE
ID integer
SRV varchar(3)
pz_id integer
wzc_id integer
wz_id integer
status_c integer
kod_8 varchar(10)
waga integer
MGP_PZ
pz_id integer
srv varchar(3)
data_pz date
nr integer
pz_numer COMPUTED BY ((CAST(NR||'/'||(EXTRACT(YEAR FROM DATA_PZ)) AS
VARCHAR(10))));
MGP_WZC
wzc_id integer
srv varchar(3)
data_wzc date
nr integer
wzc_numer COMPUTED BY ((CAST(NR||'/'||(EXTRACT(YEAR FROM DATA_WZC)) AS
VARCHAR(10))));
When I execute following statement I get 'expression evaluation not
supported' error
SELECT
WZC.WZC_NUMER
, R.STATUS_C
, cast(count(R.kod_8) as integer) as ile
, cast(sum(R.waga) as integer) as kg
from mgp_role R
LEFT JOIN MGP_WZC WZC ON (WZC.SRV = R.SRV AND WZC.WZC_ID = R.WZC_ID)
where r.srv = 'GDY'
GROUP BY
WZC.WZC_NUMER , R.STATUS_C
I thougth that it concerns something with computed field WZC_numer - when I
replace wzc_numer with wzc_id everything is ok - so I've tried similar
statement:
SELECT
PZ.PZ_NUMER
, R.STATUS_C
, cast(count(R.kod_8) as integer) as ile
, cast(sum(R.waga) as integer) as kg
from mgp_role R
LEFT JOIN MGP_PZ PZ ON (PZ.SRV = R.SRV AND PZ.PZ_ID = R.PZ_ID)
where r.srv = 'GDY'
GROUP BY
PZ.PZ_NUMER , R.STATUS_C
and it works perfect.
Any help?
Tested on Firebird 1 (827) on Win 2K
TIA
Marcin
I have 3 tables:
MGP_ROLE
ID integer
SRV varchar(3)
pz_id integer
wzc_id integer
wz_id integer
status_c integer
kod_8 varchar(10)
waga integer
MGP_PZ
pz_id integer
srv varchar(3)
data_pz date
nr integer
pz_numer COMPUTED BY ((CAST(NR||'/'||(EXTRACT(YEAR FROM DATA_PZ)) AS
VARCHAR(10))));
MGP_WZC
wzc_id integer
srv varchar(3)
data_wzc date
nr integer
wzc_numer COMPUTED BY ((CAST(NR||'/'||(EXTRACT(YEAR FROM DATA_WZC)) AS
VARCHAR(10))));
When I execute following statement I get 'expression evaluation not
supported' error
SELECT
WZC.WZC_NUMER
, R.STATUS_C
, cast(count(R.kod_8) as integer) as ile
, cast(sum(R.waga) as integer) as kg
from mgp_role R
LEFT JOIN MGP_WZC WZC ON (WZC.SRV = R.SRV AND WZC.WZC_ID = R.WZC_ID)
where r.srv = 'GDY'
GROUP BY
WZC.WZC_NUMER , R.STATUS_C
I thougth that it concerns something with computed field WZC_numer - when I
replace wzc_numer with wzc_id everything is ok - so I've tried similar
statement:
SELECT
PZ.PZ_NUMER
, R.STATUS_C
, cast(count(R.kod_8) as integer) as ile
, cast(sum(R.waga) as integer) as kg
from mgp_role R
LEFT JOIN MGP_PZ PZ ON (PZ.SRV = R.SRV AND PZ.PZ_ID = R.PZ_ID)
where r.srv = 'GDY'
GROUP BY
PZ.PZ_NUMER , R.STATUS_C
and it works perfect.
Any help?
Tested on Firebird 1 (827) on Win 2K
TIA
Marcin