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     how to store all the selected rows through a SQLin a table and retrieve the data back

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to store all the selected rows through a SQLin a table and retrieve the data back
 Login/Join
 
<gaurav>
posted
Hi,
I have to store start date and end date of each week. I started a loop with counter starting from first week to the last week to retrieve each week's start and end date and store it in a table.
But the table stores only the last week's data.
The code for the same is as below:

-REPEAT TEST FOR &TEMPWEEK FROM &STARTWEEK TO &ENDWEEK

SQL
SELECT WK_BEG_D, WK_END_D FROM ACCT_DATE WHERE WK_COUNT_I = &TEMPWEEK;
TABLE
ON TABLE HOLD AS WEEK_DETAILS
END
-TEST


Can some one help me out in the above problem.
Also once I store all the data in a hold, how would I retieve each row's data from that hold to be used further.

TIA
Gaurav
 
Report This Post
Master
posted Hide Post
That's Correct it would only store that last instance of data as each loop recreates that hold file. Try a filedef for the hold file with append before the loop and besure to issue a -RUN after the FILEDEF.

Example:
FILEDEF WEEK_DETAILS DISK C:\IBI\APPS\basedir\WEEK_DETAILS.FTM (APPEND
-RUN

you might have to use hold format ALPHA:

example:
ON TABLE HOLD AS WEEK_DETAILS FORMAT ALPHA
 
Posts: 865 | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
If you want all the weeks in one file, can you select all the weeks at one time, rather than doing one pass for each value of your counter?

ie select rows where WK_COUNT_I from &STARTWEEK to &ENDWEEK

(Sorry, don't write SQL often, but I would guess that is doable.)

Then you don't have to worry about the append.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report 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     how to store all the selected rows through a SQLin a table and retrieve the data back

Copyright © 1996-2020 Information Builders