I am writing a script to remove rows from a SQL Azure database. When I execute this script in Jupyter
notebook it runs forever and never deletes the rows. Any ideas why this script is not executing?
key = input("Enter key to remove\n")
cnxn = pyodbc.connect(
'DRIVER='+driver+';SERVER='+server+'; UID='+username+';PWD='+ password)
cursor = cnxn.cursor()
sql = "DELETE FROM Customer where CustomerID like '{key}%'"
process = sql.format(key = key)
cursor.execute(process)
cursor.commit()