[CLOSED] View generated sql query using view source
Hi,
(new to webfocus)
I am trying to get "view source" of the executed sql code/query.
Action: - trying to get view source code when clicking the EXCEL button (Exported to EXCEL where the query is excuted)
When using the below on the top of the file.
SET XRETRIEVAL=OFF SET TRACEOFF = ALL SET TRACEON=STMTRACE SET TRACEON = SQLAGGR//CLIENT SET TRACEON = STMTRACE//CLIENT SET TRACEON = STMTRACE/2/CLIENT SET TRACEUSER = ON
I get Error number: -3706
Another option I could think of is saving the query to variable and send it to alert message? But was unsuccessful in getting the query.
the below shows the output of the table. -* ....... TABLEF ON TABLE HOLD AS APPLE FORMAT ALPHA END -RUN -SET &ECHO=OFF; -HTMLFORM BEGIN <script> alert("Query : " + !IBI.FIL.APPLE;
-HTMLFORM END -RUN -EXIT -*
Any suggestions.
Thanks.This message has been edited. Last edited by: FP Mod Chuck,
WEBFOCUS - 8202 OS - Windows Output - PDF, Excel, HTML, txt.
August 07, 2020, 12:41 PM
FP Mod Chuck
Phil
Welcome to Focal Point! If you add -SET &ECHO=ALL; as the first line of your fex and after you run it view the source of the output and scroll to the bottom, it will display the SQL generated. Your output needs to be HTML in order for this to work.
Out of curiosity, which DBMS are you accessing?
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 14, 2020, 11:34 AM
PHIL1234
Thanks Chuck.
I am connecting to Teradata.
I am able to see it now.
Thanks again.
WEBFOCUS - 8202 OS - Windows Output - PDF, Excel, HTML, txt.