RE: odd sql question

2008-10-29 Thread Adrian Lynch
database of ColdFusion errors at http://cferror.org/ -Original Message- From: Scott Stewart Sent: 29 October 2008 16:58 To: cf-talk Subject: odd sql question i have a table with a field (study_category.category_date) that is a comma delimited list (2004,2005,2006,2007) stored as a NVARC

Re: odd sql question

2008-10-29 Thread Ian Skinner
Scott Stewart wrote: > i have a table with a field (study_category.category_date) that is a > comma delimited list (2004,2005,2006,2007) stored as a NVARCHAR > > I need to see if a passed value is in the list: > > WHERE (#arguments.cat_date# in (study_category.category_date)) > > arguments.cat_da

Re: odd sql question

2008-10-29 Thread Jason Fisher
Pretty sure that's not going to work for you ... believe the argument on the left of the IN has to be a column, not a variable. In any case, your best bet is to have the category_date properly normalized out into a separate table: FROM study_category INNER JOIN study_category_date ON study_cate

odd sql question

2008-10-29 Thread Scott Stewart
i have a table with a field (study_category.category_date) that is a comma delimited list (2004,2005,2006,2007) stored as a NVARCHAR I need to see if a passed value is in the list: WHERE (#arguments.cat_date# in (study_category.category_date)) arguments.cat_date is a four digit number represen