This is a discussion on Re: IF Statement within the Informix forums, part of the Database Server Software category; --> June C. Hunt wrote: > Nicolas Mainczyk wrote: > >>Hi, >> >>I'm newbie on Informix RDBMS. >> >>I would ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| June C. Hunt wrote: > Nicolas Mainczyk wrote: > >>Hi, >> >>I'm newbie on Informix RDBMS. >> >>I would like to know the equivalent syntax for the following mysql query: >> >>SELECT if(condition1,operation1,0),if(condition2,operatio n1,0),etc... FROM >>table WHERE whereclause > > > You might try either the CASE expression or the DECODE function. You didn't > say which version of Informix that you are using, so I might be leading you > on a bit of a goose chase with one or both of those. I'm not positive how > long these have been available, Version 7.31, IIRC. Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /| | http://MydasSolutions.com |///// / //| | +-----------------------------------+//// / ///| | |We value your comments, which have |/// / ////| | |been recorded and automatically |// / /////| | |emailed back to us for our records.|/ ////////| +----------------------+-----------------------------------+-----------+ sending to informix-list |