Mungkin bisa dicoba pakai fungsi ....
Contoh sbb:
SQL> CREATE OR REPLACE TYPE my_type AS OBJECT (nomor NUMBER);
2 /
Type created.
SQL> CREATE OR REPLACE TYPE my_type_tbl AS TABLE OF my_type;
2 /
Type created.
SQL> CREATE OR REPLACE FUNCTION gen_angka(p_max NUMBER)
RETURN my_type_tbl PIPELINED
IS
TYPE ref1 IS REF CURSOR;
out_rec my_type := my_type (NULL);
BEGIN
FOR i IN 1..p_max LOOP
out_rec := my_type(i);
PIPE ROW(out_rec);
END LOOP;
END;
/
SQL> select * from table(gen_angka(4));
NOMOR
----------
1
2
3
4
SQL> select * from table(gen_angka(10));
NOMOR
----------
1
2
3
4
5
6
7
8
9
10
Bowo
--- In [email protected], Herman <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Ada yang tahu cara mengenerate angka dengan grant user biasa?
>
> Contoh yang working dengan user dba :
>
> select rownum
> from user_objects
> where rownum <= 10
>
> angka 10 itu hanya contoh. Kita bisa merubah sesuka hati kita.
> Dengan user biasa, contoh diatas tidak bisa berjalan dengan baik
karena
> user_objectsnya terbatas.
>
> Thanks before.
>
> Herman
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
-----------------------------------------------
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/