So write the code that is in your cfquery into a file:
<cfquery datasource="dsn"> select * from table where id = #id# </cfquery <cfset querystring = " select * from table where id = #id#"> <cffile mode=write" variable="querystring"> I think you can get the idea from here Matthew Small IT Supervisor Showstopper National Dance Competitions 3660 Old Kings Hwy Murrells Inlet, SC 29576 843-357-1847 http://www.showstopperonline.com -----Original Message----- From: Michael Ross [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 11:02 AM To: CF-Talk Subject: Get Actual Query Run I have a question. I have a query that is built depending on many things, the where statement, order by, actual columns asked for that kinda thing..... I want to save what the actual sql text is that ran that query. Like what you can see in the debugging code. Does this make sense? Any help would be great. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4