Also, a follow up, what you *can* do is create the query in a cfsave
content outside of the query, saving it to a variable, and then just
put that variable in the cfquery tags.  Then you will be able to
access that variable later on as well.  If you aren't using cf 7, this
may be your best option.

On 3/15/06, Ryan Guill <[EMAIL PROTECTED]> wrote:
> 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:235432
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to