title: How can I do a column check while running INSERT query?
body: <p>I want to INSERT a number of rows in a table CARTON with columns ID and STATUS. Where I want to check if the STATUS value is not 'CLOSED'. If it is 'CLOSED' then ignore the query and move on, if it is not then go ahead and INSERT the row.
  P.S. I can't add check or any constraints on the table.</p>
  <p>I want to do something like this:</p>
  <p>IF status in ('OPEN', 'IN_PROGRESS') then INSERT into carton(id, status) values(1, 'OPEN')
  ELSE - move to the next query.</p>
  <p>Please suggest your solutions.</p>