I am using the following sql:
String realname;
String fakename;
String sql = "UPDATE PERSON SET NAME = CAST(REPLACE(CAST(NAME as nvarchar(max)), ? , ?) as ntext)";
PreparedStatement preparedstmt = conn.prepareStatement(sql);
preparedstmt.setString(1, realname);
preparedstmt.setString(2, fakename);
realname and fakenames are from config files. I don't know their values during coding.
I want to match the exact word.
like '% word %'
example:
I want to match only Tom , not Tommy.
Please help.