QuotedValueList  
Description
Gets the values of each record returned from an executed query. ColdFusion does not evaluate the arguments.
 
Returns
A delimited list of the values of each record returned from an executed query. Each value is enclosed in single quotation marks.
 
Category
Query functions
 
Function syntax
QuotedValueList(query.column [, delimiter ])
 
See also
ValueList
 
Parameters
 
Parameter      Description
query.column Name of an executed query and column. Separate query name and column name with a period.
delimiter A string or a variable that contains one. Character(s)?? that separate column
  data.*delim separates every element, not just columns? so say, "column elements"
  not "column data?"
  *Have query in, tlane, whether the single-delim rule applies to ALL uses of
  "delims", not just in list tags. If so, replace the above with: *& check all tags & funcs
  (10/18/2001)
  Character that separates list elements. Default: comma.
  If this field contains more than one character, ColdFusion processes each
  occurrence of each character as a delimiter.
 
Example
<h3>QuotedValueList Example</h3>
<!--- use the contents of one query to create another dynamically --->
<cfset List = "`BIOL', `CHEM'">
<!--- first, get the department IDs in our list --->
<cfquery name = "GetDepartments" datasource = "cfsnippets">
   SELECT Dept_ID FROM Departments
   WHERE Dept_ID IN (#PreserveSingleQuotes(List)#)
</cfquery>
<!--- now, select the courses for that department based on the
quotedValueList produced from our previous query --->
<cfquery name = "GetCourseList" datasource = "cfsnippets">
   SELECT *
   FROM CourseList
   WHERE Dept_ID IN (#QuotedValueList(GetDepartments.Dept_ID)#)
</cfquery>
<!--- now, output the results --->
<cfoutput QUERY = "GetCourseList" >
<pre>#Course_ID#   #Dept_ID#   #CorNumber#   #CorName#</pre>
</cfoutput>
query.column  
Name of an executed query and column. Separate query name and column name with a period.
delimiter  
A string or a variable that contains one. Character(s) that separate column data.