Use <CFSAVECONTENT> to grab the output and save it in a variable, or if you need a single column and want it as a list use ValueList() or QuotedValueList().
--- Ben -----Original Message----- From: Jim Vosika [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 2:18 PM To: CF-Talk Subject: Setting Query results as a Variable I am querying my Database and getting back multiple results, as you with any query. I would like to put those results into a Variable to be used in a CFFILE function like: <CFFILE ACTION=WRITE FILE="file.html" OUTPUT="#MyQueryVariable#"> Here is my query if it matters: <CFQUERY DATASOURCE=createhtml NAME=QueryRNI> SELECT * FROM RNI WHERE rniPID=225221 ORDER by rniSection, rniSortOrder; </CFQUERY> <cfoutput query=QueryRNI>#rniContents#<br></cfoutput> - This outputs all the rows as needed. I tried setting the variable using: <CFSET Variables.finalContents="#QueryRNI.rnoContents#"> and then outputting the variable in the CFFILE tag but that seemed to only return the first row of results. I also tried <CFFILE ACTION=WRITE FILE="file.html" OUTPUT="#QueryRNI.rnoContents#"> This also only gave back one row of results. Any suggestions on where to go from here? Is this a Query of Query's thing? I have never used QofQ before but I didn't think it was the solution. Thanks, Jim Vosika SoftwareSuperMall.Com ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona 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

