Hallo,
Ich habe eine stored procedure geschrieben, die ich mit Java aufrufen möchte. Der call Aufruf wirft mir die ORA ORA-06576: Kein gültiger Funktions- oder Prozedurname
das ist der Aufruf
call CASHDATA.archivieren('11.11.2009');
und die procedure:
Ich habe eine stored procedure geschrieben, die ich mit Java aufrufen möchte. Der call Aufruf wirft mir die ORA ORA-06576: Kein gültiger Funktions- oder Prozedurname
das ist der Aufruf
call CASHDATA.archivieren('11.11.2009');
und die procedure:
Java:
CREATE or replace PROCEDURE "CASHDATA"."archivieren" (datum IN VARCHAR2)
as
BEGIN
insert into cashdata.mt940importbuchungen_ar (select * from cashdata.mt940importbuchungen where satzid is not null and importkontoid in ( select importkontoid from cashdata.mt940importkonten where auszugsdatum<=to_date('datum','dd.mm.yyyy')));
insert into cashdata.mt940importkonten_ar ( select * from cashdata.mt940importkonten where auszugsdatum<=to_date('datum','dd.mm.yyyy'));
insert into cashdata.bestandinfo_ar (select * from cashdata.bestandinfo where bestandid in ( select bestandid from cashdata.bestand where bestandsdatum<=to_date('datum','dd.mm.yyyy')));
insert into cashdata.bestand_ar ( select * from cashdata.bestand where bestandsdatum<=to_date('datum','dd.mm.yyyy'));
insert into cashdata.transaktion_ar ( select * from cashdata.transaktion where datum<=to_date('datum','dd.mm.yyyy'));
insert into cashdata.vormerkposten_ar ( select * from cashdata.vormerkposten where buchungsdatum<=to_date('datum','dd.mm.yyyy'));
delete from cashdata.mt940importbuchungen where satzid is not null and importkontoid in ( select importkontoid from cashdata.mt940importkonten where auszugsdatum<=to_date('datum','dd.mm.yyyy'));
delete from cashdata.mt940importkonten where auszugsdatum<=to_date('datum','dd.mm.yyyy');
delete from cashdata.bestandinfo where bestandid in ( select bestandid from cashdata.bestand where bestandsdatum<=to_date('datum','dd.mm.yyyy'));
delete from cashdata.bestand where bestandsdatum<=to_date('datum','dd.mm.yyyy');
delete from cashdata.transaktion where datum<=to_date('datum','dd.mm.yyyy');
delete from cashdata.vormerkposten where buchungsdatum<=to_date('datum','dd.mm.yyyy');
END;