Whatever message this page gives is out now! Go check it out!

QuotedValueList

Last update:
May 18, 2026

Description

Gets the values of each record returned from an executed query.

Returns

A delimited list of the values of each record returned from an executed query. Each value is enclosed in single quotation marks.

Category

Function syntax

QuotedValueList(query.column [, delimiter ])

See also

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.

Example 1

<cfscript>
    myQuery = queryNew("id,name,amount","Integer,Varchar,Integer", 
                [ 
                        {id=1,name="One",amount=15}, 
                        {id=2,name="Two",amount=18}, 
                        {id=3,name="Three",amount=32},
                        {id=4,name="Four",amount=53}
                ]); 
    
    // add columns
    QueryAddColumn(myQuery,"city","Varchar",["London","Madrid","Paris","Munich"])

    // QuotedValueList
    myList=QuotedValueList(myQuery.city,"|")
    writeOutput(myList)
</cfscript>
Output
'London'|'Madrid'|'Paris'|'Munich'

Example 2

<cfquery name = "GetCourseList" datasource = "cfdocexamples"> 
       select * from APP.COURSELIST where DEPT_ID in ('BIOL','MATH')
</cfquery> 
<cfscript>
       myList=QuotedValueList(GetCourseList.CORNUMBER," | ");
       WriteDump(myList);
</cfscript>
Output
'100' | '500' | '800' | '510' | '820' | '100' | '500' | '800'

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page