This was posted here some time ago.  Sorry I don't remember who :-(

<CFQUERY NAME="GetDocs"...>
  SELECT
    '"' + RTRIM(FieldA) + '"' + ',' +
    '"' + RTRIM(FieldB) + '"' + ',' +
    '"' + RTRIM(FieldC) + '"'
   AS line

  FROM 
    table
</CFQUERY>

<!--- create the file content ---->
<CFSET filecontent = ValueList(GetDocs.line,"#CHR(13)##CHR(10)#")>

<!--- and save it --->
<cffile action="APPEND" file="#csvfile#" output="#filecontent#">

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to