title: cx_Oracle.DatabaseError ORA-01722: invalid number python
body: <p>I need to insert multiple records from csv to oracle database.but getting below error .As Far as I understood it is throwing error because it is trying to convert date and time from string to date data type and throwing error . how can I rectify this error so that it get inserted . initially I am trying to insert only one row but it will have around half a million and also I am not allowed to change datatype at db level  .There are similar questions but couldn't really understand or find solution for it that is why posting this .</p>
  <p><strong>Note:This code is working for different csv and different table having two columns and db datatype having varchar for both columns</strong></p>
  <p>Error:</p>
  <pre><code>    Traceback (most recent call last):
        File &quot;D:\test\insertfutclient.py&quot;, line 26, in &lt;module&gt;
          cursor.executemany(sql, data)
      cx_Oracle.DatabaseError: ORA-01722: invalid number
  </code></pre>
  <p>MY CSV file:</p>
  <pre><code>CL_SEQ,CL_TMID,CL_CLIENT_ID,CL_PAN,CL_CLI_STATUS,CL_PAN_STATUS,CL_ACTION_TYPE,CL_CREATED_DATE,CL_CREATED_BY,CL_MODIFIED_DATE,CL_MODIFIED_BY
  3793375,21,MEN0008,ARJPP6330Q,A,V ,0,9/6/2019 14:23,SYSTEM,9/9/2019 11:28,SYSTEM
  </code></pre>
  <p>My code:</p>
  <pre><code>    # Predefine the memory areas to match the table definition
      cursor.setinputsizes(None,25)
  
      # Adjust the batch size to meet your memory and performance requirements
      batch_size = 1
  
      with open('C:\\Users\\ncdex1124\Desktop\\New folder\\file9.csv', 'r') as csv_file:
          csv_reader = csv.reader(csv_file, delimiter=',')
          sql = &quot;INSERT INTO UCIDBA.fut_client_list VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)&quot;
          data = []
          for line in csv_reader:
              data.append((line[0],line[1],line[2],line[3],line[4],line[5],line[6],line[7],line[8],line[9],line[10]))
              if len(data) % batch_size == 0:
                  cursor.executemany(sql, data)
          if data:
              cursor.executemany(sql, data)
          connection.commit()
          print(&quot;successful&quot;)
  </code></pre>
  <p>Databse table info :</p>
  <pre><code>    desc fut_client_list
      Name                  Null     Type                                                                                                                                                                                                                
  
      CL_SEQ                NOT NULL NUMBER                                                                                                                                                                                                              
      CL_TMID                        VARCHAR2(5)                                                                                                                                                                                                         
      CL_CLIENT_ID                   VARCHAR2(10)                                                                                                                                                                                                        
      CL_PAN                         VARCHAR2(10)                                                                                                                                                                                                        
      CL_CLI_STATUS                  CHAR(1)                                                                                                                                                                                                             
      CL_PAN_STATUS                  CHAR(2)                                                                                                                                                                                                             
      CL_ACTION_TYPE                 VARCHAR2(1)                                                                                                                                                                                                         
      CL_CREATED_DATE                DATE                                                                                                                                                                                                                
      CL_CREATED_BY                  VARCHAR2(10)                                                                                                                                                                                                        
      CL_MODIFIED_DATE               DATE                                                                                                                                                                                                                
      CL_MODIFIED_BY                 VARCHAR2(10)                                                                                                                                                                                                        
  </code></pre>