Is it an SP?  If so you can build up a SQL string that you execute by using
EXEC(sqlstring).  You can then set an output parameter to be the SQL string

------------------------------------------------------------------ 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
------------------------------------------------------------------ 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
------------------------------------------------------------------ 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131
------------------------------------------------------------------ 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890. 



-----Original Message-----
From: Chris Phillips [mailto:[EMAIL PROTECTED]]
Sent: 26 March 2001 10:51
To: CF-Talk
Subject: any way to retrieve the actual SQL used


Hi all

Is there any way to retrieve the actual SQL (rather than the records
returned) by a dynamic query?

ie I have a page that bases its query on the form fields filled in on the
previous page. I want to actually use the SQL statement for sth else.

It comes out if you turn debugging on, but is it accessible eg as a variable
of some sort?

Any thoughts are welcome

Many thanks in advance

Chris

====================================
 chris phillips
 communisis one plc multimedia team
 0113 225 5373
 mailto:[EMAIL PROTECTED]
 http://www.communisis-one.co.uk
====================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to