alhamdulilah mantap pak rudi..akhirnya sudah bisa terupdate tablenya, makasih 
banyak pak

--- Pada Sen, 10/5/10, Rudy <[email protected]> menulis:

Dari: Rudy <[email protected]>
Judul: Re: Bls: [indo-oracle] Re: tidak bisa update table didalam fungsi
Kepada: [email protected]
Tanggal: Senin, 10 Mei, 2010, 3:34 AM















 
 



  


    
      
      
      Untuk coba autonomous, speerti contoh di bawah.



PROCEDURE coba_autonomous 

IS

  PRAGMA AUTONOMOUS_TRANSACT ION;

BEGIN

   insert ....

   commit;

END coba_autonomous;

 Regard's

Rudy



____________ _________ _________ __

From: Teguh Susanto <teguh4milis@ yahoo.com>

To: indo-oracle@ yahoogroups. com

Sent: Mon, May 10, 2010 3:01:47 PM

Subject: Bls: [indo-oracle] Re: tidak bisa update table didalam fungsi



iya pak, kebetulan sy buat Function GetNomorTransksi tapi klo saat dirun SELECT 
GetNomorTransaksi( :parameter) FROM dual; pasti resultnya gagal eh tyt fungsi 
DML tidak bisa dijalankan tadi sy coba cari di mbah google katanya harus diset 
autonomous transaction, tapi yg jadi masalah gimana setting autonomous 
transaction itu...he3



--- Pada Sen, 10/5/10, yulius_wibowo <yulius_wibowo@ yahoo.com> menulis:



Dari: yulius_wibowo <yulius_wibowo@ yahoo.com>

Judul: Bls: [indo-oracle] Re: tidak bisa update table didalam fungsi

Kepada: indo-oracle@ yahoogroups. com

Tanggal: Senin, 10 Mei, 2010, 2:32 AM



Anda pakai SELECT GETNOMORTRANSAKSI ('abc') FROM ...



utk memanggil fungsinya ya?



bw



--- In indo-oracle@ yahoogroups. com, Teguh Susanto <teguh4milis@ ...> wrote:



>



> makasih pak yulius, akhirnya errornya keluar btw klo error kaya gini : "14551 
> - ORA-14551: cannot perform a DML operation inside a query" Â&#63728;itu apa 
> yang harus disetting ya?



> 



> --- Pada Sen, 10/5/10, yulius_wibowo <yulius_wibowo@ ...> menulis:



> 



> Dari: yulius_wibowo <yulius_wibowo@ ...>



> Judul: [indo-oracle] Re: tidak bisa update table didalam fungsi



> Kepada: indo-oracle@ yahoogroups. com



> Tanggal: Senin, 10 Mei, 2010, 12:49 AM



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> Â&#63728;



> 



> 



> 



> 



> 



> 



> 



> 



> 



>       Utk mengetahui detail errornya, coba tambahkan sqlcode & sqlerrm pada 
> return 'GAGAL' sbb:



> 



> ...



> 



> return 'GAGAL' || SQLCODE || ' - ' || SQLERRM;



> 



> ...



> 



> 



> 



> Bowo



> 



> 



> 



> --- In indo-oracle@ yahoogroups. com, Teguh Susanto <teguh4milis@ ...> wrote:



> 



> >



> 



> > klo diluar Function bisa berhasil pak dan no urutnya bertambah, oh utk 
> > parameter input&output itu sebenernya ada parameter kode table itu pak tapi 
> > setelah sy coba masih belum terupdate



> 



> > 



> 



> > --- Pada Kam, 6/5/10, murdi santoso <sandi_ui@ .> menulis:



> 



> > 



> 



> > Dari: murdi santoso <sandi_ui@ .>



> 



> > Judul: Re: [indo-oracle] tidak bisa update table didalam fungsi



> 



> > Kepada: indo-oracle@ yahoogroups. com



> 



> > Tanggal: Kamis, 6 Mei, 2010, 5:58 AM



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > ÂÂ&#63728;



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> >       script update nya dah dicoba namual blom diluar function..?



> 



> > 



> 



> > dan apakah berhasil..?



> 



> > 



> 



> > 



> 



> > 



> 



> > dan parameter input funtion itu berfungsi untuk apa..? karna tdk masuk ke 
> > dalam script update sama skali..?



> 



> > 



> 



> > 



> 



> > 



> 



> > UPDATE TD_NOMOR_TRANSAKSI 



> 



> > 



> 



> >    SET NO_URUT=NO_URUT+ 1 



> 



> > 



> 



> > ??? WHERE KD_TABLE = 'tm_detail_asset' ;  ???



> 



> > 



> 



> > 



> 



> > 



> 



> > mungkin kd_table harus huruf capital upper(kd_table) .



> 



> > 



> 



> > 



> 



> > 



> 



> > ____________ _________ _________ __



> 



> > 



> 



> > From: Teguh Susanto <teguh4milis@ yahoo.com>



> 



> > 



> 



> > To: indo-oracle@ yahoogroups. com



> 



> > 



> 



> > Sent: Thu, May 6, 2010 4:10:11 PM



> 



> > 



> 



> > Subject: [indo-oracle] tidak bisa update table didalam fungsi



> 



> > 



> 



> > 



> 



> > 



> 



> > kepada miliser &senior DBAsaya lagi buat function tapi belum berhasil 
> > banget karena update table (DDL) tidak berhasilini saya sertakan contoh 
> > scriptnyacreate or replaceFUNCTION GETNOMORTRANSAKSI  (  fTable IN VARCHAR2 
> >  ) RETURN VARCHAR2 is hasil varchar2(20) ;vnomor varchar2(20) ;BEGIN  
> > UPDATE TD_NOMOR_TRANSAKSI SET NO_URUT=NO_URUT+ 1 WHERE KD_TABLE = 
> > 'tm_detail_asset' ;  RETURN 'BEHASIL' ;EXCEPTION   when others then    
> > return 'GAGAL';END GETNOMORTRANSAKSI;



> 



> > 



> 



> > apabila fungsi tsb dirun pasti resultnya 'GAGAL', dan data di field no_urut 
> > tidak bertambah, mungkin dari miliser or senior DBA bisa kasih solusi 
> > masalah saya..a.tas perhatiannya terimakasih



> 



> > 



> 



> > 



> 



> > 



> 



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



> 



> > 



> 



> > 



> 



> > 



> 



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



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



> > 



> 



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



> 



> >



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



> 



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



>



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



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





    
     

    
    


 



  












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

Kirim email ke