I am using a query with a where clause and a string variable for a char column, but I'm not getting any results. When I replace the string variable with a string literal, it works as expected:

select * from emp where ename = 'SCOTT'

This statement returns 1 row.

select * from emp where ename = :v_ename

This statement does not return any row, even though the value of :v_ename is 'SCOTT'.

What's wrong?