Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Philippe Verdy — — source: Informix-list mailing list archive (1991-1998)
Jacob Salomon wrote:
>Sood_Niraj/SO@instru.fi wrote:
>
>> Hi everybody,
>
>>3. One customer is asking following: Is it possible to do query with
>>boolean like this:
>> select 1 + (x=3) from my_table_containing_x_as_int
>
Yes you can:
CREATE PROCEDURE num_equal(
x DECIMAL(18), y DECIMAL(18)
) RETURNING INTEGER;IF x = y THEN
RETURN 1;
END IF;
RETURN 0;
END PROCEDURE;
Then you can do:
select 1 + num_equal(x,3) from my_table_containing_x_as_int
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.