Remove empty ValueList strings
Posted on 2012-08-21
<CFQUERY NAME="CatInfo" DATASOURCE="NEWS1">
<cfset clist = ValueList(CatInfo.catword)>
CATWORD is a comma delimited list of words. Strings may include one, two, or even three words, each string separated by comma and spaces between each multi-word strings.
I need to eliminate blank or empty words, that is, resulting strings found empty (separated by commas).
I cannot replace the comma like this:
<cfset clist = ReplaceNoCase(clist, ",", "", "All")>
because it removes all commas,
I can't just remove spaces as there are spaces between two-word strings. So, without having to rewrite the cfquery, is there a way to handle this and still use ValueList?