title: If Else Condition at Trigger in Oracle SQL
body: <p>I have two tables.They are </p>
  
  <pre><code>CARD(cardid, credit, usertype,charge)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>PAYMENTDEVICE(paydevid, paydevip,paydevdate, paydevtime, chargedcardid, mealtype). 
  </code></pre>
  
  <p>Mealtype can be 'guest' or 'standard'. I want to update credit that is in card table, when a new row is inserted in paymentdevice. Charge depends on usertype. But if meal type is guest, everyone has to pay 5$ . I try to use following code</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER  "TRG_PAYMONEY" 
  AFTER INSERT
  ON PAYMENTDEVICE FOR EACH ROW
  
  BEGIN
  UPDATE CARD
  WHERE CARDID = :NEW.CHARGEDCARDID
  SET CREDIT = 
  (CASE MEALTYPE
  
  WHEN "STANDARD" THEN CREDIT - CHARGE
  WHEN "GUEST" THEN CREDIT - 5
  END);
  END;
  </code></pre>
  
  <p>But i get this error : 
  <code>PL/SQL: ORA-00971: missing SET keyword, PL/SQL: SQL Statement ignored</code>. Could you help me please?</p>