This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I want to retrieve rows from an Oracle table which has values like "sp_bowl" or "asp_007" etc. My query is like SELECT MYROW FROM MYTABLE WHERE MYCOLUMN LIKE ? I'm using PreparedStatements, and passing Strings using preparedStatement.setString(1,"%"+myString+"%"). When the use enters "sp_" as the string to be passed to the query, I'm getting all rows which have "sp" in them, but not ones which have the UNDERSCORE character in them. How can I force the Underscore character to be treated literally and not as a wildcard ? Any suggestions would be welcome. Thanks.