SQL SELECT Statement problem

2015-09-02 Thread Peter Haworth
Having an issue with the following statement in SQLite. SELECT col1,col2 FROM TableA WHERE colid IN (:1) This is executed with put revQueryDatabase(gdbid,tsql,"tArray") into tCursor If tArray[1] contains a single integer, the SELECT works, if tArray[1] contains a comma separated list of integer

Re: SQL SELECT Statement problem

2015-09-15 Thread Bob Sneidar
Not sure if it matters, but I use LIKE '%:1%'. Also remember that with sqLite, and unlike mySQL, this form will not find records beginning with, ending with or explicitly is whatever replaces :1. Why the implementations of the different SQL engines behave differently escapes me, other than to th

Re: SQL SELECT Statement problem

2015-09-15 Thread Peter Haworth
I found that LIKE :1 where the :1 variable contains %whatever% with no quotes around it works, at least ion sqlite. I'm not sure I understand your comment about this not finding rows that begin with, end with, or contain the string in sqlite. It's always worked for me. On Tue, Sep 15, 2015 at 9

Re: SQL SELECT Statement problem

2015-09-15 Thread Bob Sneidar
I will have to go back and check. I seem to remember having a problem with sqLite using just '%:1%' and reading that the solution for sqLite was LIKE ':1%' or LIKE '%:1%' or LIKE '%:1' or LIKE ':1' whereas I did not have the problem with mySQL. Bob S > On Sep 15, 2015, at 09:31 , Peter Hawor