🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11142

Re: IIF or CASE

#11142
From: Bill Todd
Date: Tue, 03 Dec 2002 14:29
30 lines
1595 bytes

On 2 Dec 2002 21:12:40 -0800, "nitebird" <nitebird@time.net.my> wrote:

>
>Hi all,
>
>I'm able to use IIF in FoxPro ODBC and it generates really nice result. The sample code is as follow:
>
>SELECT b.category,
>  SUM (iif(a.fperiod=1, qty*1 , 0)) as Jan,
>  SUM (iif(a.fperiod=2, qty*1 , 0)) as Feb,
>  SUM (iif(a.fperiod=3, qty*1 , 0)) as Mac,
>FROM aTable
>bil))/4)
>Group by category
>
>Can I do the same in IB?

No.

>Is there any equivalent to IIF or CASE in IB?

>
>TIA


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Technical Details
Message-ID: <9tfpuug35lgn4ovvg6epm643suq419brd7@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dec3d48$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,5f6f676ee9638e28
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-03 06:39:29 PST
From: Bill Todd <bill@notthis.dbginc.com>
Newsgroups: borland.public.interbase.sql
Subject: Re: IIF or CASE
Date: Tue, 03 Dec 2002 07:29:17 -0700
Message-ID: <9tfpuug35lgn4ovvg6epm643suq419brd7@4ax.com>
References: <3dec3d48$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.207.211.30
X-Trace: newsgroups.borland.com 1038925756 216.207.211.30 (3 Dec 2002 06:29:16 -0800)
Lines: 30
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail