Re: Standard syntax?

From: Jie Liang <jliang(at)ipinc(dot)com>
To: Franz J Fortuny <ffortuny(at)ivsol(dot)com>
Cc: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Standard syntax?
Date: 2000-10-12 18:19:37
Message-ID: 39E600B9.F484679@ipinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

This is not SQL92, I believe it's an extention of Pg , Oracle uses 'decode' to
implement if-then elsif then-else structure.

Franz J Fortuny wrote:

> I have been using (with success) this SQL statement in PostgreSQL:
>
> select col1,
> case when col2 = true then
> col3
> else
> col4
> end as colw,
> colM
> where .... etc.
>
> The above syntax, however, does not work for Interbase (6.01). For those who
> have had experience in other SQL servers, is this a "standard" or ANSI 9X
> compatible syntax or should I refrain from such syntax if I want my
> statements to be transportable from SQL Server to SQL Server?
>
> Best regards,
>
> Franz Fortuny

--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang(at)ipinc(dot)com
www.ipinc.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message John McKown 2000-10-12 18:37:09 Re: if else query help
Previous Message Tomas Berndtsson 2000-10-12 17:54:43 Re: Standard syntax?