Skip to main content
Inspiring
May 20, 2009
Answered

How can I save cfquery sql text, not the results

  • May 20, 2009
  • 2 replies
  • 1015 views

Hi,

I have the need to save a dynamically generated cfquery actual sql, not the results.

I can see it in <cfdump var="#<qry_name>#"> but, how can I capture the actual sql

and save it in a var for later use ?

Thanks,

Bob

    This topic has been closed for replies.
    Correct answer ilssac

    The results property of the <cfquery....> tag allows you to put that information into a variable for later use.

    I.E.

    <cfquery ... results="stuff">...</cfquery>

    <cfdump var="#stuff#">

    2 replies

    Participating Frequently
    May 21, 2009
    
    ....
    
    
    
    ]]>

    Mack

    ilssac
    ilssacCorrect answer
    Inspiring
    May 20, 2009

    The results property of the <cfquery....> tag allows you to put that information into a variable for later use.

    I.E.

    <cfquery ... results="stuff">...</cfquery>

    <cfdump var="#stuff#">

    macslayerAuthor
    Inspiring
    May 20, 2009

    Thanks, but I do not want the Results, I want the SQL.

    macslayerAuthor
    Inspiring
    May 20, 2009

    Oh, I see, it actualy does put the sql in the structure.   Thanks, that will do it !!