I was not trying to update a record. I wanted to copy a row, but change one value in it. In other words, I wanted to insert a new row into my database with all the exact same values of another row, but one, to prevent identical rows.
With UPDATE there are no new rows inserted into the database.
I read the above string from a list and pass it to the below query,
sql = "DELETE FROM docs WHERE pathVariId = '"+myfile+"'"
but I get the error as below
sqlite3.OperationalError: near "D": syntax error
any suggestions to get rid of that '\' which is causing the error, thanks
You could try triple quote the outer double quotes for query. Path name seems Ok, it is only single back slash escaped.
Next time do not hijack old thread but make your own, include link to old thread if necessary.
Thank you, I did try with triple quote and '?' placeholder but the issue was with passing the string as unicode(myfile) instead of str(myfile)
Sorry for posting to the old thread as I came here while searching for the same error message. Thanks a lot for being patient, humble, putting your time and answering silly questions. which is far better than stackexchange ;)
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...