Hi all,
I'm trying to search for some content within a bytea field. My
PreparedStatement looks like this:
SELECT id FROM mytable WHERE myfield LIKE ?
Now, when I execute a
ps.setString(1, "%" + value + "%")
where 'value' is the value I want to search for, the PS becomes
SELECT id FROM mytable WHERE myfield LIKE %VALUE%
and the query clearly fails ("operator does not exist: bytea ~~
character varying"). Now, my question is....why? What am I doing
wrong?
Thanks for you help!