Re: SQL Statement

From: Mohamed Hashim <mhashim_at_crc.ca>
Date: Thu, 29 Jul 1999 13:01:12 -0400
Message-ID: <37A088D8.3ED454F2_at_crc.ca>


Hi
DECODE is just another form of (IF THEN ELSE)

    IF A=B THEN X
    IF A=C THEN Y
    ELSE Z; Your example:

    IF decode(mod(rownum,5), = 0 THEN ROWNUM     ELSE NULL; Hope this helps

Mohamed

"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 Thu Jul 29 1999 - 19:01:12 CEST

Original text of this message