Re: SQL Statement

From: K Raza <ELN/Kraza_at_earthlink.net>
Date: Tue, 20 Jul 1999 15:23:44 -0700
Message-ID: <7n2smp$t88$1_at_oak.prod.itd.earthlink.net>


Whenever mod(rownum,5) results in 0 it is translated rownum otherwise to NULL.
This looks like rownum is to be displayed on every 5th row.

Note : mod(rownum,5) returns the remainder when rownum is divided by 5.

Hope that helps

Tay, Virginia wrote in message <97712538_at_NEWS.SAIC.COM>...
>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:23:44 CEST

Original text of this message