I want to delete all rows in my tables that are empty. But the same command I use in SQL doesnt work in Python. Its on my raspberry and im using SQLite3.
I dont get any error message doing:
import sqlite3
currency_pairs = ['AUDUSD', 'EURCHF', 'EURUSD', 'EURCAD']
conn = sqlite3.connect("/home/ken/database/database.db")
cursor = conn.cursor()
for c in currency_pairs:
cursor.execute("DELETE FROM {c} WHERE Close IS NULL;".format(c=c))
conn.close()
Again, using DELETE FROM AUDUSD WHERE Close IS NULL; for example works in my sqlite3 programm.