Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query output to text file

Status
Not open for further replies.

dinoviapangea

Technical User
Apr 9, 2002
41
US
I know there is a way to write the output of a single query to a text file (and it wasn't with cffile), but I can't remember where I seen it. Can anyone help.

Thanks
 
<CFCONTENT
TYPE=&quot;application/vnd.ms-excel&quot; >
<!--- This is for writing the string values in to the output file--->
<CFSCRIPT>
WriteOutput(#youroutput#);
</CFSCRIPT>


the above code writes the output of ur query to a excel file.

if you want to have it in a text file, in the cfcontent tag, change the type to text.

cfscript tag writes the output to the file. in the WriteOutput(#youroutput#), youroutput is the variable which has to store ur query output.

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top