2 Replies Latest reply on Apr 15, 2015 2:30 PM by achervov

    Bind variables dialog box  eats leading zeroes for string

    achervov

      Here is the test case:

       

      drop procedure test_bind;
      drop table t_test_bind;
      
      create table t_test_bind ( bind_val VARCHAR2(10));
      
      create function test_bind(p_num in VARCHAR2) return VARCHAR2 as
      begin
      dbms_output.put_line('p_num = ['|| p_num || ']');
      return p_num;
      end;
      /
      
      insert into t_test_bind
      select test_bind(:p_num) from dual;
      
      select * from t_test_bind;
      
      

       

      If I enter value '000123' value into Bind variables dialog box for :p_num bind variables I get '123' value inserted into a table

       

      Meanwhile, simple select working fine

       

      select test_bind(:p_num) from dual;