This function performs a very highly efficient conversion of a Query object to a CSV string, delimited by whatever token you wish.
Contents |
ToCSV( query [, delimitor ] )
This function returns back the query as a CSV string/
<cfset csv = ToCSV( myQry )> <cfset csvTab = ToCSV( myQry, "TAB" )>
This function does not touch the underlying query object. It will output the rows in the order to which they appear in the query object. The first row of the CSV output will contain the column names. Any strings will be enclosed with quotes (") and if a string contains a quote, it will be double quoted.