Subject | Re: view porting problem |
---|---|
Author | Fikret Hasovic |
Post date | 2004-01-23T10:35:43Z |
Hi Arno.
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Datatypes are not comparable in expression CASE.
What to do?
Any other SQL construction can give me the same result?
Fikret Hasovic
TAMP R&D Team
> (CASE0 (zero)
> WHEN COALESCE(EC_UsrID, 0) <> 0 THEN EC_UsrTS
> WHEN COALESCE(KV_UsrID, 0) <> 0 THEN KV_UsrTS
> WHEN COALESCE(OE_UsrID, 0) <> 0 THEN OE_UsrTS
> WHEN COALESCE(MD_UsrID, 0) <> 0 THEN MD_UsrTS
> ELSE 0
> END) as StatusTS
>
> or if EC_UsrID, KV_UsrID, OE_UsrID and MD_UsrID never has the value
> then :I have tried that, but I allways get error:
>
> (CASE
> WHEN EC_UsrID IS NOT NULL THEN EC_UsrTS
> WHEN KV_UsrID IS NOT NULL THEN KV_UsrTS
> WHEN OE_UsrID IS NOT NULL THEN OE_UsrTS
> WHEN MD_UsrID IS NOT NULL THEN MD_UsrTS
> ELSE 0
> END) as StatusTS
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Datatypes are not comparable in expression CASE.
What to do?
Any other SQL construction can give me the same result?
>Best regards
> Regards,
> Arno Brinkman
> ABVisie
>
Fikret Hasovic
TAMP R&D Team