Python Forum
inserting data into oracle db using python
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
inserting data into oracle db using python
#10
(May-22-2017, 03:34 PM)sahilsiddharth Wrote: cursor.execute("""INSERT INTO TELM VALUES(%s)""", (a))
That's not a tuple, it's just a. Because it's a single item, you need to add a comma to force a single-element tuple, like so:
cursor.execute("""insert into telm values (%s)""", (a, ))
Reply


Messages In This Thread
RE: inserting data into oracle db using python - by nilamo - May-22-2017, 08:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Load data in Oracle muzokh 0 275 Mar-08-2024, 11:19 PM
Last Post: muzokh
  python script for inserting rows into hbase table lravikumarvsp 7 7,177 Mar-24-2023, 04:44 AM
Last Post: parth_botadara
  Basic SQL query using Py: Inserting or querying sqlite3 database not returning data marlonbown 3 1,420 Nov-08-2022, 07:16 PM
Last Post: marlonbown
  Migrating data from oracle into postgres python_student 1 2,482 Feb-10-2022, 09:16 PM
Last Post: buran
  Encrypting Oracle Passwords / Python Library for That? bmccollum 1 2,624 Jun-11-2021, 07:59 PM
Last Post: Larz60+
  Load data from One oracle Table to Multiple tables amy83 1 1,800 Dec-02-2020, 01:57 AM
Last Post: Larz60+
  Calling Oracle REST SQL from Python johnjacob 2 2,072 Nov-05-2020, 04:19 AM
Last Post: johnjacob
  Python to Oracle Conn Issue chvsnarayana 2 42,321 Sep-06-2020, 04:33 PM
Last Post: Larz60+
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 2 6,556 Jul-09-2020, 04:46 PM
Last Post: srikanth7482
  Matching Regex in Python from Excelfile and inserting into database Shuzo 0 1,643 May-14-2020, 06:53 PM
Last Post: Shuzo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020