ResultSet ivRs = con.createStatement().excuteQuery(select x_id from
tbl_y where fname like '%" + param + "%'");
It works as expected
How to I implement this as a prepared statement ?
An alternative sollution to what Christan suggested should be:
... WHERE fname LIKE '%' & ? & '%'
& is the Operat
Hi Christian.
You hit the nail right on the head.
Thank you very much.
Michael MacIntyre
Christian Krone wrote:
Hello,
Michael MacIntyre had problems with using a like predicate in a prepared
statement:
[...] where fname like ?");
This executes, returns nothing - it should
> ivPs.setString(1,some
Hello,
Michael MacIntyre had problems with using a like predicate in a prepared
statement:
[...] where fname like ?");
This executes, returns nothing - it should
> ivPs.setString(1,someParam);
Yes, because a like predicate without surrounding % is like using
the = comparison, so the complete fname
Hello,
I am attempting to use prepared statements and am running into some
difficulty: I am uncertain of the proper syntax.
If I have this query:
ResultSet ivRs = con.createStatement().excuteQuery(select x_id from
tbl_y where fname like '%" + param + "%'");
It works as expected
How to I implemen