SQL IN() function

Ralph DiMola rdimola at evergreeninfo.net
Thu May 21 12:36:42 EDT 2015


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
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] 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 <bobsneidar at iotecdigital.com> 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
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list