[sqlite] Problem with coalesce in a where clause with bind variables

2014-08-06 Thread Martin Engelschalk
Hello List, I have a strange problem with a statement like select id from some_table where coalesce(some_col, 1) = :1 where :1 is a bind variable which i bind in my program using sqlite3_bind_text. I get no records, even if there are no null values anywhere in some_col. I get the

Re: [sqlite] Problem with coalesce in a where clause with bind variables

2014-08-06 Thread Richard Hipp
On Wed, Aug 6, 2014 at 11:29 AM, Martin Engelschalk engelsch...@codeswift.com wrote: Hello List, I have a strange problem with a statement like select id from some_table where coalesce(some_col, 1) = :1 where :1 is a bind variable which i bind in my program using sqlite3_bind_text.

Re: [sqlite] Problem with coalesce in a where clause with bind variables

2014-08-06 Thread Stephan Beal
On Wed, Aug 6, 2014 at 5:29 PM, Martin Engelschalk engelsch...@codeswift.com wrote: Hello List, I have a strange problem with a statement like select id from some_table where coalesce(some_col, 1) = :1 where :1 is a bind variable which i bind in my program using sqlite3_bind_text.