But why don't you use SELECT x from y WHERE y.x LIKE ? ;
and bind the first parameter to "%SomeText%" instead of "SomeText" like before? -----Original Message----- From: Slater, Chad [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 6:40 PM To: sqlite-users@sqlite.org Subject: [sqlite] LIKE operator with prepared statements Is it possible to use the LIKE operator with a prepared statement? I'm trying to build a query that uses binding for the text in the LIKE operation as follows: SELECT x from y WHERE y.x LIKE %?% ; ...And binding text to the positional parameter in hopes to get: SELECT x from y WHERE y.x LIKE %SomeText% ; But it results in a sql parse error. Is %Q and sqlite3_mprintf my only option here? Chad