Understood. But my list is a BLOB column, not a literal. And with a BLOB column (and possibly *ANY* column) the IN function only returns 1 if the first item matches. It will not find the 2+ item in a list.
But I did some more digging and it turns out that FIND_IN_SET works. Now to see if this function is available in sqLite. If not, I cannot use comma delimited lists with sqLite. Bob S > On May 21, 2015, at 09:36 , Ralph DiMola <[email protected]> wrote: > > The IN function is a substitute for multiple Ors > > SELECT * FROM customers WHERE name IN ('Ralph', 'Bob', 'Bill'); > > Is the same as > > SELECT * FROM customers WHERE name = 'Ralph' OR name = 'Bob' OR name = 'Bill'; > > Ralph DiMola > IT Director > Evergreen Information Services > [email protected] > > -----Original Message----- > From: use-livecode [mailto:[email protected]] On Behalf > Of Bob Sneidar > Sent: Thursday, May 21, 2015 12:20 PM > To: How to use LiveCode > Subject: Re: SQL IN() function > > that should read devicelist stupid spel corect. :-) > > Bob S > > >> On May 21, 2015, at 09:14 , Bob Sneidar <[email protected]> wrote: >> >> Hi all. >> >> I am having a problem with a query. I have the value “647,6480” in a column >> called devicelist. I use the query: >> >> SELECT * FROM formsgen.service where 647 in(device list); >> >> It returns one record as it should. However if I use the query: >> >> SELECT * FROM formsgen.service where 6480 in(device list); >> >> I get NO RECORDS. Am I misunderstanding the IN function? BTW the column is a >> BLOB type. Not sure if that matters. >> >> Bob S >> >> >> _______________________________________________ >> use-livecode mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
