select minof two columns
Posted in 1999
Topics: General Discussion
Hi, I'm a newbie with Informix (coming from Oracle world). Now I have the following situation: Table tab has col1,col2,col3. I want something like: select col1, least(col2,col3) from tab; It is possible to do it under Oracle, how can I do it with Informix? Any information is appreciated, Antje Sackwitz
The following (ANSI-standard, I think) should work
SELECT col1, (CASE col2 < col3
THEN col2,
ELSE col3
END)
FROM table
WHERE ....
Rudy
"Sackwitz, Antje" wrote:
> Hi,
> I'm a newbie with Informix (coming from Oracle world).
> Now I have the following situation:
> Table tab has col1,col2,col3.
> I want something like: select col1, least(col2,col3) from tab;
> It is possible to do it under Oracle,
> how can I do it with Informix?
> Any information is appreciated,
>
> Antje Sackwitz