> Well, the only problem is that won't match the first and last > elements in that field, nor if it is the element in that > field, so you really need: > > SELECT EmailAddr, RecipientID > FROM SupportEmailRecipient > <cfif ListLen(Form.SubjectID)> > WHERE > (SubjectID LIKE '%#FORM.SubjectID#,%' > OR > SubjectID LIKE '%,#FORM.SubjectID#,%' > OR > SubjectID LIKE '%,#FORM.SubjectID#%' > OR > SubjectID = '%#FORM.SubjectID#%') > </cfif> > > Or did I miss something obvious?
Actually, this is slightly better; SELECT EmailAddr, RecipientID FROM SupportEmailRecipient WHERE ','+SubjectID+',' LIKE '%,#FORM.SubjectID#,%' I'm using + as I'm used to SQL Server, but for Access you'd use & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4