title: How to do the pattern matching in 'if' condition in oracle stored procedure
body: <pre><code>CREATE OR REPLACE PROCEDURE get_pop1
  AS
  ROUTERNAME_V varchar2(100);
  BEGIN
  SELECT TRAFFIC_CUST_ID
  INTO ROUTERNAME_V
  FROM INTERFACE_ATTLAS
  WHERE rownum &lt; 2;
  IF  CHARINDEX('RNS',ROUTERNAME_V) &gt; 0
  dbms_output.put_line(routername_v);
  ELSE
  PRINT 'It doesn''t Contain'
  END;
  </code></pre>
  
  <p>/* HERE I AM TRYING TO DISPLAY THE RECORDS ONLY IT STARTS WITH 'RNS' STRING
   I am getting error like : </p>
  
  <hr>
  
  <p>10/3     PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting
           one of the following:
           * &amp; - + / at mod remainder rem then  and or
           || multiset
           The symbol "*" was substituted for "DBMS_OUTPUT" to continue.</p>
  
  <p>10/37    PLS-00103: Encountered the symbol ";" when expecting one of the
           following:
           . ( * % &amp; - + / at mod remainder rem then 
           and or || */</p>