Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TRUNCATE TABLE budget_seuil;
- Accept x NUMBER Prompt " Entrez le seuil : "
- DECLARE
- Cursor budget_eSeuil(s NUMBER) IS (SELECT Num_operation,Date_operation,montant FROM budget WHERE montant > s) ;
- ligne budget_eSeuil % Rowtype;
- seuil NUMBER;
- BEGIN
- seuil:=&x;
- OPEN budget_eSeuil(seuil);
- loop
- Fetch budget_eSeuil INTO ligne;
- exit WHEN budget_eSeuil%NotFound ;
- INSERT INTO BUDGET_SEUIL VALUES (ligne.num_operation,ligne.date_operation,ligne.montant) ;
- END loop;
- close budget_eSeuil;
- END;
- /
- ------------------------------------------------------------------------------>
- TRUNCATE TABLE budget_seuil;
- Accept x NUMBER Prompt " Entrez le seuil : "
- DECLARE
- BEGIN
- FOR ligne IN (SELECT Num_operation,Date_operation,montant FROM budget WHERE montant > &x)
- loop
- INSERT INTO BUDGET_SEUIL VALUES (ligne.num_operation,ligne.date_operation,ligne.montant) ;
- END loop;
- END;
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement