Home > database >  About in oracle database into excel spreadsheet data in python
About in oracle database into excel spreadsheet data in python

Time:12-29

I want to use python has a excel table, insert into the oracle database table records, tested directly on the statement used to determine the value of the can be inserted, but read excle values to insert is not successful, in order to find which field has a problem, I only chose two fields to insert data, or an error:
Traceback (the most recent call last) :
The File "C: \ Users \ zhtle \ Desktop \ import Oracle database tables. Py", line 80, in & lt; module>
Curs. Executemany (SQL, hangz)
TypeError: expecting number


The following is the main part statement:
Hang=[]
For I in range (sheet1 max_column) :
Hang. Append (row [I] value)
I +=1
SQL="insert" into "+ Table +" (SMKEY XZQMC) values (: 0, : 1) "'
Hangz=[(0, hang [0]), (1, hang [13])]
Print (SQL)
Print (hangz)
Curs. Executemany (SQL, hangz)

The print information:
Host:
Com:
Fwname:
Username:
Password:
Table:
Excel:
Insert into BDCK_XZQ (SMKEY, XZQMC) values (: 0, : 1)

[(0, 20), (1, 'YueXi County)]

Always can't find where the problem is, I hereby just contact oracle please correct the following project, thank you very much!
  • Related