voici mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
CREATE OR REPLACE PROCEDURE transaction_of_delete(l_commit_freq IN NUMBER) IS
CURSOR c1 IS
SELECT rowid FROM smf_closing_prices partition(P_SMF_SMFCP_20070305_D)
WHERE tstp_typ_stat_price not in ('01','06','07');
TYPE rowtab IS TABLE of rowid INDEX BY BINARY_INTEGER;
id ROWTAB;	   
BEGIN
	LOOP
		OPEN c1;
		FETCH c1 BULK COLLECT INTO id LIMIT l_commit_freq;
		IF (id.count=0) THEN
		   EXIT;
		END IF;
		FORALL i IN id.FIRST..id.LAST
			   DELETE FROM smf_closing_prices where rowid=id(i);
		COMMIT;
		CLOSE c1;
	END LOOP;
END transaction_of_delete;
/
Cela fonctionne sans prob! A savoir je travaille sous Oracle 8.1.7 et j'aimerais que cette procédure puisse recevoir la partition de la table que je veux traiter en paramètre. Comme vous le voyez pour le moment c'est statique excepté pour le bulk size.
Qqun saurait-il m'aider?
Merci