Another SQL question
kray at sonsothunder.com
Wed Feb 4 11:02:19 CST 2009
On 2/2/09 3:46 PM, "Bob Sneidar" <bobs at twft.com> wrote:
> Wow! Not in my reference manual it's not. 11.2 is "Numeric Types". But
> then I downloaded the PDF manual. Seems that it is either out of date
> or not "exactly" correct. I also searched for IN() in the manual and
> came up with squadouch.
That's why I always use the online manual...
The other thing to note is that "IN" can be used both for checking for
matching value in field(s) in another table with a "subselect", or even for
a simple string comparison.
For example, you can do this (this is admittedly a bad example because you
don't need to do the subselect, but it's more FYI):
SELECT * FROM People WHERE PhoneLink IN
(SELECT RecID FROM Phones WHERE PhoneType='Fax')
And you can also do this:
SELECT * FROM Phones WHERE PhoneType IN ('Fax','Work','Home')
The reason I mention this, is that when I first went to look for this a
while ago, I thought it would be under SELECT, but now I know better.
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode