Reputation: 3
I get the error message pls-00103 at line 3 and 5 with this part of a trigger Im trying to make. If RENDEZVOUSSTART is after or equal to 6pm (18:00 here) the price multiplicator is 1.5 and the NOTAUXHORAIRE should be 1, in all other cases, the price multiplicator is 1 and NOTAUXHORAIRE is 0.
if to_char (:new.RENDEZVOUSSTART, 'HH24') >= 18
THEN multiplicator := 1.5
and :new.NOTAUXHORAIRE := 1 ;
else multiplicator := 1
AND :new.NOTAUXHORAIRE := 0;
end if;
Error(3,35): PLS-00103: Symbole "=" rencontré à la place d'un des symboles suivants : . ( * @ % & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || indicator multiset member submultiset Symbole "* inséré avant "=" pour continuer.
Thank you very much everyone! I just started to learn Sql for a business class and Im still a newbie :D
Upvotes: 0
Views: 1851
Reputation: 1269443
The and
is unnecessary:
if to_char (:new.RENDEZVOUSSTART, 'HH24') >= 18 THEN
multiplicator := 1.5;
:new.NOTAUXHORAIRE := 1;
else multiplicator:= 1;
:new.NOTAUXHORAIRE := 0;
end if;
Upvotes: 1