At 10:10 AM -0700 1/18/06, Robert Simpson wrote:
----- Original Message ----- From: "Marvin K. Bellamy" <[EMAIL PROTECTED]>
I want to prepare a statement like this one:

SELECT name FROM people WHERE name LIKE '%?%'

But, it looks like host parameters inside string literals aren't parsed. Any clues as to how I pull this off or if the parameter really will be parsed?

SELECT name from people WHERE name LIKE ?

Your parameter then should contain the text to look for, such as "%mytext%"

Alternately, and probably more elegantly,

  SELECT name FROM people WHERE name LIKE '%' || ? || '%'

-- Darren Duncan

Reply via email to