Re: [PyWrapper-devel] search on enumerations
Status: Alpha
Brought to you by:
jatorre
|
From: Renato De G. <re...@cr...> - 2006-08-04 14:26:15
|
Hi,
It's possible to handle LIKEs, but the SQL expression can look a bit
ugly if your translation table is big. Instead of comparing the
search value directly with the field value, you need to compare it
with a nested CASE expression such as:
SELECT ... FROM ... WHERE (CASE WHEN field =3D 'xxx' THEN ('aaa') ELSE
(CASE WHEN field =3D 'yyy' THEN 'bbb' ELSE null END) END) like 'a%';
Definitely not the best performance, but it should work.
Regards,
--
Renato
On 27 Jul 2006 at 10:46, Markus D=F6ring wrote:
>
> hi,
> id like to implement searching on schema enumerations.
> I allow to setup a translation between local database terms and
> schema/concept terms.
> So when searching I need to translate the argument as well. Thats
> horrible for LIKEs. So I will only allow an equal operation for now
> on enumerations. Do you think this is very bad?
>
> Markus
|