Hello all,
I am attempting to return all rows from a table by
searching for an integer value in a varchar column
that contains a comma-seperated list of numbers.
Right now the query is only returning rows that are
single values and not part of a comma-seperated list.
For example if I try to look for records that contain
a value of 3 in the EMonth column:
ID EMonth
----------
1 1
2 3
3 1,2,3
only row 2 will be returned. The query ignores row 3
and any other row with a comma-sep list.
THE CODE
--------
SELECT ID as cardid, CardName, ELogo, Monthly, ECatID
FROM ECards
WHERE '#frmEMonth#' IN (Emonth) AND monthly=1
<cfif fSubcatID>AND
eSubcatID=#fSubcatID#</cfif>
<cfif fCatID>AND ECatID=#fCatID#</cfif>
ORDER BY sortCard
--------
Thanks for any help.
Brian
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4