title: SQL IBM DB2 (Windows 10) not reading end if; (stored procedure)
body: <p>I'm getting this error for my stored procedure. My ibm db2 doesn't seem to be reading the <code>END IF;</code> statement. </p>
  
  <p>I'm using Windows 10 for my db2.</p>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>SQL0104N  An unexpected token "END@" was found following "_Details)".  Expected
    tokens may include:  "END IF".   </p>
  </blockquote>
  
  <p>My code:</p>
  
  <pre><code>CREATE PROCEDURE SeatPricing (IN seat_num varchar(2), ticket_id varchar(10))
  BEGIN 
      IF seat_num LIKE 'A_' THEN
      UPDATE Ticket_Details 
      SET seat_price = 500.00
      WHERE ticket_id = (SELECT ticket_id
                         FROM Ticket_Details);
      UPDATE Ticket 
      SET seat_price = 500.00
      WHERE ticket_id = (SELECT ticket_id
                         FROM Ticket);
    ELSE 
      UPDATE Ticket_Details
      SET seat_price = 300.00
      WHERE ticket_id = (SELECT ticket_id
                         FROM Ticket_Details);
      UPDATE Ticket
      SET seat_price = 300.00
      WHERE ticket_id = (SELECT ticket_id
                         FROM Ticket);
      END IF;
   END@
   /
  </code></pre>