CodeGhoib... HELP!!!: ORA-06550: line 2, column 14: PLS-00905: object DISTRIBUSI.SP_SISADEPOSIT is invalid ORA-06550: line 2, column 1: PL/SQL: Statement ignored

19 views
Skip to first unread message

CodeGhoib

unread,
Jun 11, 2009, 10:31:25 PM6/11/09
to Oracle in World
I receive this message when I try to compile a store procedure:
ORA-06550: line 2, column 14:
PLS-00905: object DISTRIBUSI.SP_SISADEPOSIT is invalid
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

PLEASE SOME ONE HELP ME!!! (URGENT!!!)

Below is the complete store procedure script/query:

------ [START] QUERY CODE ------

PROCEDURE DISTRIBUSI.SP_SISADEPOSIT (
lokasi IN varchar2,
tanggal IN date
) AS

periode varchar2(7);
tgl_saldo date;
tgl_awal date;
tgl_akhir date;

BEGIN
-- inISialISasi variabel------------------
periode:='';
tgl_saldo := tanggal + 1;
tgl_awal := last_day(add_months(tanggal,-1)) +1;
tgl_akhir := tanggal+1;
-- end -----------------------------------

-- get current periode
-------------------------------------------------------------------
SELECT 'O' || TO_CHAR(tanggal,'RRRR') || TO_CHAR(tanggal,'MM') INTO
periode FROM dual;
-- end get current period
----------------------------------------------------------------

declare

begin

DELETE FROM t_tempdeposit
WHERE TRIM(kode_lokasi) = TRIM(lokasi);

DELETE FROM t_tempdeposit_all
WHERE TRIM(kode_lokasi) = TRIM(lokasi);

COMMIT;

-- Insert Saldo Deposit
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_deposit,kode_lokasi,kode_pelanggan)
SELECT a.bukti_deposit,SUM(awal) AS
jumlah,a.kode_lokasi,a.kode_pelanggan
FROM T_ARUSDEPOSIT a
WHERE TRIM(a.kode_periode) = TRIM(periode) AND
TRIM(a.kode_lokasi) = TRIM(lokasi)
GROUP BY

a.bukti_deposit,a.kode_lokasi,a.kode_pelanggan,a.kode_periode;

-- INSERT master deposit 1 (Deposit Murni)
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_deposit,kode_lokasi,kode_pelanggan)
SELECT a.bukti_bayar,b.nilai,a.kode_lokasi,a.kode_pelanggan
FROM t_trans_bayar a
INNER JOIN t_trans_bayar_dtl2 b
ON TRIM(a.bukti_bayar) = TRIM(b.bukti_bayar)
WHERE ( (a.tgl_transaksi >= tgl_awal
AND a.tgl_transaksi < tgl_akhir ) OR
TRIM(a.kode_periode)=TRIM(periode) )
AND b.bukti_bayar LIKE '%DP%'
AND b.bukti_ref LIKE '%DP%'
AND TRIM(a.kode_lokasi) = TRIM(lokasi)
AND TRIM(a.status_aktif) = '1';

-- INSERT master deposit 2
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_deposit,kode_lokasi,kode_pelanggan)
SELECT b.bukti_bayar,b.nilai,a.kode_lokasi,a.kode_pelanggan
FROM t_trans_bayar a
INNER JOIN t_trans_bayar_dtl2 b
ON TRIM(a.bukti_bayar) = TRIM(b.bukti_ref)
WHERE ( (a.tgl_transaksi >= tgl_awal
AND a.tgl_transaksi < tgl_akhir) OR
TRIM(a.kode_periode)=TRIM(periode) )
AND UPPER(b.bukti_bayar) LIKE '%DP%'
AND
(
UPPER(b.bukti_ref) LIKE '%BF%' OR
UPPER(b.bukti_ref) LIKE '%GG%'
)
AND TRIM(a.kode_lokasi) = TRIM(lokasi)
AND TRIM(a.status_aktif) = '1';

-- INSERT master deposit 3 (dari ganti giro)
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_deposit,kode_lokasi,kode_pelanggan)
SELECT b.bukti_bayar,b.nilai,a.kode_lokasi,a.kode_pelanggan
FROM t_trans_ganti_giro a
INNER JOIN t_trans_bayar_dtl2 b
ON TRIM(a.bukti_ganti) = TRIM(b.bukti_ref)
WHERE ( (a.tgl_transaksi >= tgl_awal
AND a.tgl_transaksi < tgl_akhir) OR
TRIM(a.kode_periode)=TRIM(periode) )
AND UPPER(b.bukti_bayar) LIKE '%DP%'
AND UPPER(b.bukti_ref) LIKE '%GG%'
AND TRIM(a.kode_lokasi) = TRIM(lokasi)
AND TRIM(a.status_aktif) = '1';

-- INSERT master deposit 4 (dari deposit manual)
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_deposit,kode_lokasi,kode_pelanggan)
SELECT a.bukti_bayar,b.nilai,a.kode_lokasi,a.kode_pelanggan
FROM t_trans_bayar a
INNER JOIN t_trans_bayar_dtl2 b
ON TRIM(a.bukti_bayar) = TRIM(b.bukti_bayar)
WHERE ( (a.tgl_transaksi >= tgl_awal AND a.tgl_transaksi <
tgl_akhir) OR
TRIM(a.kode_periode)=TRIM(periode) )
AND UPPER(b.bukti_bayar) LIKE '%DM%'
AND UPPER(b.bukti_ref) LIKE '%DM%'
AND TRIM(a.kode_lokasi) = TRIM(lokasi)
AND TRIM(a.status_aktif) = '1';

-- INSERT alokasi deposit
INSERT INTO t_tempdeposit
(bukti_deposit,nilai_bayar,kode_lokasi,kode_pelanggan)
SELECT b.bukti,b.bayar,a.kode_lokasi,a.kode_pelanggan
FROM t_trans_bayar a
INNER JOIN t_trans_bayar_dtl2 b
ON TRIM(a.bukti_bayar) = TRIM(b.bukti_bayar)
WHERE a.bukti_bayar LIKE '%BF%'
AND ( UPPER(b.bukti) LIKE '%DP%' OR UPPER(b.bukti) LIKE '%DM
%' )
AND a.tgl_transaksi >= tgl_awal
AND a.tgl_transaksi < tgl_akhir
AND TRIM(a.kode_lokasi) = TRIM(lokasi)
AND TRIM(b.jenis_bayar) = '5'
AND TRIM(a.status_aktif) = '1';

-- INSERT Summary
INSERT INTO t_tempdeposit_all
(bukti_deposit,nilai_deposit,nilai_bayar,sisa_deposit,kode_lokasi,kode_pelanggan)
SELECT a.bukti_deposit,SUM(a.nilai_deposit),SUM(a.nilai_bayar),(SUM
(a.nilai_deposit)-SUM(a.nilai_bayar)) AS
sisa_deposit,a.kode_lokasi,a.kode_pelanggan
FROM t_tempdeposit a
WHERE TRIM(a.kode_lokasi) = TRIM(lokasi)
GROUP BY a.bukti_deposit,a.kode_lokasi,a.kode_pelanggan;

COMMIT;

end;

end;

------ [END] QUERY CODE ------

CodeGhoib

unread,
Jun 11, 2009, 10:31:48 PM6/11/09
to Oracle in World, a_a...@yahoo.co.uk

Arju

unread,
Jun 12, 2009, 4:47:30 AM6/12/09
to oracle-...@googlegroups.com
Compile object DISTRIBUSI.SP_SISADEPOSIT and see if there is any errors.

Regards, 
Mohammad Abdul Momin Arju,
Database, Shell Script Consultant,
+8801710282272
http://arjudba.blogspot.com



From: CodeGhoib <erwin.ha...@gmail.com>
To: Oracle in World <oracle-...@googlegroups.com>
Cc: a_a...@yahoo.co.uk
Sent: Friday, 12 June, 2009 8:31:48
Subject: CodeGhoib... HELP!!!: ORA-06550: line 2, column 14: PLS-00905: object DISTRIBUSI.SP_SISADEPOSIT is invalid ORA-06550: line 2, column 1: PL/SQL: Statement ignored

CodeGhoib

unread,
Jun 16, 2009, 4:51:46 AM6/16/09
to Oracle in World
when i try compile it this error come out:

ddf

unread,
Jun 16, 2009, 9:00:37 AM6/16/09
to Oracle in World
Have you tried using 'show errors' to reveal WHY this is invalid?


David Fitzjarrell
Reply all
Reply to author
Forward
0 new messages