Python sqlite3 remove substring specified amounts of time

  python, replace, sqlite, trim

I am using sqlite3 with python and I need to remove an item from a row using the code below but only remove one instance of it. is this possible and if it is, how could it be done? I am currently using the trim function if this helps. Thanks for any responses in advance!

Code:
removeitem = ‘UPDATE TABLE SET Test=Test-1, Number=trim(Number, " ‘ + str(NumberVariable) + ‘") WHERE Name="’ + str(NameVariable) + ‘"’

Source: Python Questions

LEAVE A COMMENT