I am trying to read SQL table in python. below script I was using and able to read data correctly.
Data = pd.read_sql_query("SELECT * from Data where [ID] = " + id ,engine)
But when in type for column ID changed to nvarchar, I got below error.
DatabaseError: Execution failed on sql 'SELECT * from Data where [ID] = 123': ('42000', '[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type nvarchar to numeric. (8114) (SQLExecDirectW)')
Is there any way in which we can filter the table using a nvarchar column?