in MS SQL where 11 in items is not valid syntax. The other will not
work either. Since it only is evaluating the entire column out, it
does not parse it to realize oh it has commas lets treat it as
seperate members.  11 IN (col1,col2,col3)  is valid for finding a
record where col1 2 or 3 have a valuie of 11 but 11 in
(comma_seperated_column) will not.

Adam H 

On Fri, 25 Feb 2005 08:55:46 -0500, Matthew Small <[EMAIL PROTECTED]> wrote:
> This *might* work:
> 
> select * from myTable
> where 11 in items;
> 
> or
> 
> select * from myTable
> where 11 in (items);
> 
> - Matt Small
> 
> 
> -----Original Message-----
> From: Protoculture [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 25, 2005 7:41 AM
> To: CF-Talk
> Subject: sql question
> 
> I have a list of items in a db field [items]...
> 
> 1,11,14,12,13,17,15,18,19,16,4
> 
> Now I want to test that my item is one of those numbers thats is in that
> field and select that row. See below. If I have one number (11), I want it
> to select that row, so it needs to search the string of numbers in the field
> [items], unless there is a way to use IN keyword in this case? any ideas?
> 
> eq..
> 
> select * from myTable
> where items = 11
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196512
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to