I'm trying to dynamically generate my "where" clause for a
SQL query. I'd like to append a substring to the end of an existing
string. I tried "ListAppend", but of course that puts a comma
between the original string and the substring. I could use "Insert"
string function, but it seems rather a hassle to have to LEN the
existing string each time I want to append something to the end of
it. Is there an easy way to append a substring to the end of a
string?
Here's an example of the code (using the "ListAppend" that
doesn't work):
<CFSET whereStmt = "ads.ad_duedate + INTERVAL 1 DAY >=
NOW()">
<cfswitch expression="#vendorSort#">
<cfcase value="Yes"><CFSET whereStmt =
ListAppend(whereStmt, " AND ads.ad_vendor =
#AdSortBy#")></cfcase>
</cfswitch>