pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedInline IF condition
3+ messages / 3 participants
[nested] [flat]
* Inline IF condition
@ 2001-12-03 12:04 Tapan Trivedi <tapan.trivedi@princetonglobal.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tapan Trivedi @ 2001-12-03 12:04 UTC (permalink / raw)
To: pgsql-sql
Hi all,
Does Postgresql support DECODE() or IIF() functions like Oracle or SQLServer
2000 does ??
Re Tapan
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Inline IF condition
@ 2001-12-06 15:48 Roberto Mello <rmello@cc.usu.edu>
parent: Tapan Trivedi <tapan.trivedi@princetonglobal.com>
0 siblings, 1 reply; 3+ messages in thread
From: Roberto Mello @ 2001-12-06 15:48 UTC (permalink / raw)
To: Tapan Trivedi <tapan.trivedi@princetonglobal.com>; +Cc: pgsql-sql
On Mon, Dec 03, 2001 at 05:34:51PM +0530, Tapan Trivedi wrote:
> Hi all,
>
> Does Postgresql support DECODE() or IIF() functions like Oracle or SQLServer
> 2000 does ??
PostgreSQL supports the standard CASE...WHEN... that replaces DECODE.
Oracle supports CASE WHEN too, but Oracle users usually use the
Oracleisms counterparts.
I'm not familiar with IIF. What's it for?
-Roberto
P.S.: The PG docs have more info on CASE WHEN.
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
All in all, you're just another brick on the wall...
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Inline IF condition
@ 2001-12-06 22:42 Keith Gray <keith@heart.com.au>
parent: Roberto Mello <rmello@cc.usu.edu>
0 siblings, 0 replies; 3+ messages in thread
From: Keith Gray @ 2001-12-06 22:42 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: Tapan Trivedi <tapan.trivedi@princetonglobal.com>; pgsql-sql
Roberto Mello wrote:
>
>
> I'm not familiar with IIF. What's it for?
>
This is a M$-ism for in-line if, like ...
if true then A else B
iif(true,A,B)
--
Keith Gray
Technical Development Manager
Heart Consulting Services P/L
mailto:keith@heart.com.au
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-12-06 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-12-03 12:04 Inline IF condition Tapan Trivedi <tapan.trivedi@princetonglobal.com>
2001-12-06 15:48 ` Roberto Mello <rmello@cc.usu.edu>
2001-12-06 22:42 ` Keith Gray <keith@heart.com.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox