Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Statement

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@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 Tue Jul 20 1999 - 17:23:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US