I run your script, 

SELECT *
FROM   ( 
       SELECT id_no, tgl, ket, row_number() OVER
       (PARTITION BY id_no ORDER BY tgl DESC ) as rn
       FROM (SELECT * FROM my_test_tab)
       )
WHERE  rn<=2;

ID_NO TGL       KET                                   RN
----- --------- ------------------------------ ---------
    1 01-AUG-05 Bulan Ketiga                           1
    1 01-JUL-05 Bulan Kedua si 1                       2
    2 01-SEP-05 Bulan Selanjutnya                      1
    2 01-JUL-05 Bulan Kedua                            2

It works!!
Thanks a lot to Ferry.

Dean

--- In [email protected], "Ferry" <[EMAIL PROTECTED]> wrote:
> SELECT *
>   FROM ( SELECT id, tgl, ket,  row_number() OVER
>                (PARTITION BY id ORDER BY tgl DESC ) as rn
>           FROM (SELECT * FROM t1))
>  WHERE rn<=2;
> 
> ferry sends.






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/PhFolB/TM
--------------------------------------------------------------------~-> 

--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.lizt.org (NEW)
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke