title: Using Oracle bind variables in an application which only supports standard SQL
body: <p>I have an application which works fine to execute and parse standard SQL queries, but not PL/SQL.</p>
  
  <p>I'm trying to use bind variables, and because of lack of PL/SQL support I thought I could create a function that accepts a single variable, queries a DB, and returns the result.</p>
  
  <p>My function is as follows:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION BIND_FUNC 
  (
    IN_FLOAT IN BINDING_TEST.C2_FLOAT%TYPE 
  ) RETURN SYS_REFCURSOR AS 
    BINDTEST_CURSOR SYS_REFCURSOR;
  BEGIN
    OPEN BINDTEST_CURSOR FOR
    'SELECT * FROM BINDING_TEST WHERE C2_FLOAT = :IN_FLOAT' USING IN_FLOAT;
    RETURN BINDTEST_CURSOR;
  END BIND_FUNC;
  </code></pre>
  
  <p>My problem is that I'm not sure how to make the return value appear to my application as a normal result set.</p>
  
  <p>In SQL Developer if I run the query <strong>SELECT BINDING_FUNC(1) FROM BINDING_TEST</strong> I get a result like:</p>
  
  <pre><code>{&lt;C1_VARCHAR2=This is some text,C2_FLOAT=1&gt;,}
  </code></pre>
  
  <p>If I do something like below I get more along the results I'm looking for, but again the syntax doesn't appear supported in my application:</p>
  
  <pre><code>VARIABLE cur REFCURSOR;
  BEGIN
    :cur := BIND_FUNC(1);
  END;
  /
  PRINT cur;
  </code></pre>