mungkin logikanya spt potongan code dibawah?
tinggal convert aja ke plsql table function dan tinggal comot dari modul
lainnya?


set serveroutput on
declare
TYPE t_num IS TABLE OF number;
l_num t_num := t_num();
l_tmp number;
arg_num number := 10000;
arg_row number := 3;
begin
for i in 1..arg_row loop
l_num.extend;
if i=arg_row then
if mod(arg_num,arg_row) != 0 then
l_tmp:=0;
for j in 1..l_num.count-1 loop
l_tmp:=l_tmp+l_num(j);
end loop;
l_tmp := arg_num-l_tmp;
end if;
else
l_tmp := round(arg_num/arg_row,0);
end if;
l_num(l_num.count) := l_tmp;
end loop;

for i in 1..l_num.count loop
dbms_output.put_line(l_num(i));
end loop;
end;
/


2010/4/5 <[email protected]>

>
>
> Hello indo-oracle,
>
> mau tanya bagaimana caranya membagi nilai yang tidak terbagi ke
> beberapa row, klu di sum kembali tetap nilai itu.
> contoh nilai 10.000 mau di bagi ke dalam 3 row
>
> 1 row 3,333
> 2 row 3,333
> 3 row 3,334
>
> perintah update/insert nya bagaimana ya
> tks
>
>
> --
> Best regards,
> fansul
> mailto:[email protected] <fansul%40yahoo.co.id>
>
> __________________________________________________
> Apakah Anda Yahoo!?
> Lelah menerima spam? Surat Yahoo! memiliki perlindungan terbaik terhadap
> spam
> http://id.mail.yahoo.com
>
>  
>



-- 
thanks and regards
ujang | oracle dba | mysql dba
jakarta - indonesia


[Non-text portions of this message have been removed]



------------------------------------

--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [email protected]
Website: http://indooracle.wordpress.com
http://www.facebook.com/group.php?gid=51973053515
-----------------------------------------------

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

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indo-oracle/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> 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