Yes, the issue was with the WHERE clause.
The database field was ORDR_ID CHAR(12), but the value I was matching against was of 11 bytes.
I changed the database column and it is working now.
But why is it like this? My
string to be match was of smaller length than that of database.