Re: SQL Statement

From: Ken Geis <kgeis_at_cchemnt.cchem.berkeley.edu>
Date: Tue, 20 Jul 1999 15:31:05 -0700
Message-ID: <3794F8A9.14BC6514_at_cchemnt.cchem.berkeley.edu>


The "decode" can be read as

if rownum % 5 = 0 then

        rownum
else

        null

Ken

"Tay, Virginia" wrote:
>
> Hi,
>
> Can someone explain the following SQL statement for me...Especially.....the
> DECODE functon....Why do I need to put a 'O' right after MOD...???
>
> select title, doc_category, decode(mod(rownum,5),0,rownum,null)
> from fieldd0200
>
> Thanks in advance!!!
>
> Ben
Received on Wed Jul 21 1999 - 00:31:05 CEST

Original text of this message