Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Statement
The "decode" can be read as
if rownum % 5 = 0 then
rownum
else
null
Ken
"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 Tue Jul 20 1999 - 17:31:05 CDT
![]() |
![]() |