J'ai un oracle 10g PL/SQL programme que je suis en train de se rendre à courir,PL/SQL erreur numérique ou de la valeur: nombre de précision trop grande
Programme
set serveroutput on size 10000;
DECLARE
membership varchar2(1) :='Y';
shipping number(2,2);
quantity number(3) :=0;
BEGIN
if membership = 'Y' then
if quantity <= 3 then
shipping := 3.00;
elsif quantity > 3 and quantity <= 6 then
shipping := 5.00;
elsif quantity > 6 and quantity <= 10 then
shipping := 7.00;
elsif quantity > 10 then
shipping := 9.00;
end if;
elsif membership = 'N' then
if quantity <= 3 then
shipping := 5.00;
elsif quantity > 3 and quantity <= 6 then
shipping := 7.50;
elsif quantity > 6 and quantity <= 10 then
shipping := 10.00;
elsif quantity > 10 then
shipping := 12.00;
end if;
end if;
DBMS_OUTPUT.PUT_LINE(shipping);
END;
L'erreur Je continue à recevoir. Au début, je pensais que c'était juste parce que j'attribuais la quantité à un nombre (3), donc je comparerais avec 003 mais cela n'a pas fonctionné non plus.
Error report:
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 8
06502. 00000 - "PL/SQL: numeric or value error%s"
*Cause:
*Action:
Merci, je pensais à MySQL où le nombre avant la virgule est le nombre de chiffres restants de la décimale. – atrueresistance