title: Creating Oracle PL/SQL Stored procedure
body: <p>I'm trying to convert the SQL Query to Oracle PL/SQL stored procedure. </p>
  
  <p>Here is the query: </p>
  
  <pre><code>select * from table1 where DATE = " + s1 + " and TYPE='" + ty + "' and  NAME='"+nm+"' Order by TYPE DEsc;
  </code></pre>
  
  <p>Here is the Stored Procedure: </p>
  
  
  
  <pre><code>CREATE PROCEDURE procedure1
      ( 
      s1 IN DATE,
      ty IN CHAR DEFAULT 2,
      nm IN VARCHAR2 DEFAULT 64
      )
  IS 
      d table1.DATE%TYPE;
      C table1.TYPE%TYPE;
      S table1.NAME%TYPE;
      CURSOR tb IS select DATE,TYPE,NAME INTO d,c,s from table1;
  BEGIN
      FOR i IN tb
      LOOP 
          DBMS_OUTPUT.PUT_LINE('DATE' ||i.DATE);
          DBMS_OUTPUT.PUT_LINE('TYPE' ||i.TYPE);
          DBMS_OUTPUT.PUT_LINE('NAME' ||i.NAME);
      END LOOP;
  
  END procedure1;
  </code></pre>
  
  <p>I do not see any output after Executing Stored procedure. I'm not sure if I have created the stored procedure correctly.</p>