'How to handle special characters in the string while updating a table using python
Im trying to update some rows to a table, in one of the row a string is having few special charecters. I should be updating the string as is to the db.
I have this string "CôTE'R" in one of the column of a df.
To handle single quote (') i added one more quote like ('') which was worked, but it is not the case with '´'
query = "update mytable set Name ='CôTE''R' where id=1"
Error:
cursor.execute(query)
cx_Oracle.DatabaseError: ORA-00933: SQL command not properly ended
The same query works perfectly well when i run it in sqldeveloper.
I should be updating these strings to db as is. I couldn't able to solve this. Could anyone please help me out? Thanks!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
