Skip to content

Tag: python

Python problem with adding table to Database with sql

Hi, I’m trying to create a function that will take a table in insert(add) to the database. My Code : this is the old code when i didn’t create a function: Answer You seem to have put table_name under quotations in your to_sql function. Also, you seem to be tackling the issue of data model creation and mainten…

SQL iterate UPDATE from python list

Do you guys know how to UPDATE a database from a python list without using cur.executemany? Using cur.executemany I have problems in API calls or something. What is another way to solve this below? Thank you! I know below is crazy ugly, but I did that. Answer Not an answer but I don’t want to edit your …

SQL Query rounding issue

I am using pyodbc to fetch total quantity of a product based on a certain criteria called “Strength”. The “Strength” column also has string value for some records, so it is a varchar column. The user enters details like brand, product type, product line, date range, minimum quantity (i…

How to fix traffic session table doesn’t exists error?

When I try to execute my code,I am getting this error? How could I resolve this issue? Answer I don’t know if you wrote this POST request or if it is a library or something. Could you please provide more info about it? As the error describes, it seems that: Make sure this table exists and it is availabl…