Inserts a delimiter between each value in an executed query. ColdFusion does not evaluate the arguments.
A delimited list of the values of each record returned from an executed query.
Other functions, Query functions
ValueList(query.column [, delimiter ])
| Parameter | Description |
|---|---|
| query.column |
Name of an executed query and column. Separate query name and column name with a period. |
| delimiter |
A delimiter character to separate column data items. |
<h3>ValueList Example</h3>
<!--- use the contents of a query to create another dynamically --->
<cfquery name = "GetDepartments" datasource = "cfsnippets">
SELECT Dept_ID FROM Departments
WHERE Dept_ID IN ('BIOL')
</cfquery>
<cfquery name = "GetCourseList" datasource = "cfsnippets">
SELECT *
FROM CourseList
WHERE Dept_ID IN ('#ValueList(GetDepartments.Dept_ID)#')
</cfquery>
<cfoutput QUERY = "GetCourseList" >
<pre>#Course_ID# #Dept_ID# #CorNumber# #CorName#</pre>
</cfoutput>
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6
Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt2115.htm
Comments
djw said on Jan 5, 2005 at 6:48 PM : MikeG said on Jan 17, 2005 at 4:36 PM : galadave said on Jul 5, 2005 at 4:15 PM : ColdSteel2 said on Apr 4, 2006 at 1:00 PM :