On Fri, May 21, 2010 at 1:32 PM, C N Davies <[email protected]> wrote:

> Avoidance of NPE :)
>
> String.format("SELECT id FROM %s WHERE name like '%s')", "monkey", "doo")
>
> I'm stumped.
>
> At first I was trying to be funny, but then I realized I actually don't
know how to solve the problem (how write a LIKE pattern with % without it
breaking String.format()). I don't use String.format() at all. The query is
supposed to match Monkeys that have names that end with "doo". Two % signs
don't form the right string.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
http://www.opentempo.com
mailto:[email protected]

Reply via email to