Subject Re: [ib-support] logical operations
Author Jörg Schiemann
[snipped]
>
> > Maybe an example will clearify what I want.
> >
> > DECLARE VARIABLE RESULT INTEGER;
> > BEGIN
> > RESULT = 1 OR 4;
> > END
> >
> > RESULT should be 5
> >
>
> No, as you have discovered, this cannot be done. The SP language is
somewhat
> spartan. It primarily supports procedural execution of SQL statements.
Pretty
> much anything beyond that must be achieved by means of UDFs (as previously
> suggested). They are a powerful feature, but can bring a few extra
problems.
>
> But to step back a bit, what is it you think you need this for? There may
be
> another way of achieving your goal.

I have a field with can have 4 different values and any combination of them.
I thought a bitwise control would be best, wouldn't it?

I'm always open for a better way.


Thank you for your help

Best regards,
Jörg