Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2024 06:26 AM
Turns out the issue was my command format. After many re-attempts with changes along the way - I finally had success using the format:
sql_delete = "DELETE FROM owner.table_name WHERE ROW_ID BETWEEN :value1 AND :value2"
value_to_delete1 = variable1
value_to_delete2 = variable2
with conn.cursor() as cursor:
cursor.execute(sql_delete, [value_to_delete1, value_to_delete2])
conn.commit()
print(f"{cursor.rowcount} rows deleted from EIM_LOY_DIST previous run.")