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_at_news.ipass.net>
Date: Wed, 21 Jul 1999 09:08:19 -0400
Message-ID: <3ujl3.352$w3.594_at_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>...Received on Wed Jul 21 1999 - 15:08:19 CEST
>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
>
>