What version of cf are you using? If it is cf 7+, you can use the results attribute of <cfquery> to get the sql statement that ran. If not cf 7+, you are going to have to use the (undocumented) service factory to do it.
On 3/15/06, Jeremy Bunton <[EMAIL PROTECTED]> wrote: > Hello, > > I have a pretty large cfquery with 30 or so <cfif>'s building the where > clause. What I want do is save the actual select statement generated by that > <cfquery> so that I can then plug it in to bcp in sql server to extract the > data. I have tried to wrap cfsave content both inside and outside the > <cfquery> - inside I get an error, outside I get an empty var. Any ideas on > how I can do this, I know someone else has to of needed to do this before. > Thanks a lot > > Jeremy > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235431 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54