VALUELIST | |
Description
Inserts a delimiter between each value in an executed query. ColdFusion does not evaluate the arguments. |
|
Returns
A delimited list of the values of each record returned from an executed query. |
|
Category
List functions, Query functions |
|
Function syntaxValueList(query.column [, delimiter ]) |
|
See also
QuotedValueList |
|
Parameters
|
|
Example<h3>ValueList Example</h3> <!--- use the contents of a query to create another dynamically ---> <cfquery name = "GetDepartments" datasource = "cfdocexamples"> SELECT Dept_ID FROM Departments WHERE Dept_ID IN ('BIOL') </cfquery> <cfquery name = "GetCourseList" datasource = "cfdocexamples"> SELECT * FROM CourseList WHERE Dept_ID IN ('#GetDepartments.Dept_ID#') </cfquery> Value list of all BIOL Course ID's using (--) as the delimiter:<br> <cfoutput> #ValueList(GetCourseList.Course_ID,"--")#<br> </cfoutput> Value list of all BIOL Course Numbers using (;) as the delimiter:<br> <cfoutput> #ValueList(GetCourseList.CorNumber,";")#<br> </cfoutput> |
QUERY.COLUMN | |
DELIMITER | |