Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL runs not once

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SQL runs not once
 Login/Join
 
Gold member
posted
Hi,

I am doing


ENGINE SQLODBC SET DEFAULT_CONNECTION kuku

SQL SQLODBC PREPARE HO FOR
select ....
END
-RUN

and after that several time doing things like
DEFINE HO
dd/a3= ....
END
TABLE FILE HO
PRINT *
WHERE XX EQ 1
END

DEFINE HO
dd/a3= ....
END
TABLE FILE HO
PRINT *
WHERE XX EQ 6
END

etc.

When I look on log, it is showing me that WF runs select that I wrote to extract file HO each time when I do TABLE FILE HO. Each time this select goes with additional consitionsl like XX=1 or XX=6 etc.

Is it normal?
Do I need to do imidiately after SQL extract something like
TABLE FILE HO
PRINT *
ON TABLE HOLD AS HO2
END

and then use HO2 doing all necessary transformations?

This message has been edited. Last edited by: <Kathryn Henning>,


Wf7704/WF8,Win64/32
 
Posts: 68 | Registered: February 20, 2004Report This Post
Platinum Member
posted Hide Post
A SQL passthru will run everytime you run that fex file. I think what you are trying to accomplish is to create a permanent hold file where you take your SQL passthru, run it and then save the subsequent table so you can use it in other fexes, such as...
ENGINE SQLORA SET DEFAULT_CONNECTION <databasename>
SQL SQLORA PREPARE SQLOUT FOR
SELECT 
<whatever your SQL code is>
END

APP HOLD <name of folder on app server where you want to store the table>

TABLEF FILE SQLOUT
PRINT
<WF code here, this will be the structure and fields of the table you save>
END


APP HOLD


Hopefully this helps


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Guru
posted Hide Post
Another way to do this is to:

SQL
SELECT ........
FROM ......
WHERE .....
;
TABLE
ON TABLE HOLD AS ...... FORMAT ......
END
-RUN


Then do your defines. Your SQL will only run once.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Gold member
posted Hide Post
Thanks, Toma and MattC!


Wf7704/WF8,Win64/32
 
Posts: 68 | Registered: February 20, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL runs not once

Copyright © 1996-2020 Information Builders