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: David Sisk <davesisk_at_ipass.net>
Date: Wed, 21 Jul 1999 09:08:19 -0400
Message-ID: <3ujl3.352$w3.594@news.ipass.net>


Yup. Show me the title, doc_category, and a number. If the remainder of dividing the rownum by 5 is 0, then show me rownum, otherwise show me null. In other words, show me the rownum for every fifth row. I'm not sure why you'd want to do this, but that's what it does :=)

Regards,
--
David C. Sisk
The Unofficial ORACLE on NT site
http://www.ipass.net/~davesisk/oont.htm

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 - 08:08:19 CDT

Original text of this message

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