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     multiple queries in a report procedure

Read-Only Read-Only Topic
Go
Search
Notify
Tools
multiple queries in a report procedure
 Login/Join
 
<geetha>
posted
Hi all,

I am working on a report where I have a sql statement which will get the items, after that I need to run another query to extract the data, based on the items returned earlier. I have to pass those item values in the where clause of the next query. How do I achieve this? How do I store the items returned in the first query and retrieve them and pass each item in the where clause of the next query?

Please, experts out there tell me the ways of doing it.

Thanks in advance,
Geetha
 
Report This Post
Master
posted Hide Post
Depending on the amount of data brought back by the first query. You could have the first query create a file with the each value on a seperate line and then use the WebFOCUS

WHERE <FIELDNAME> IN FILE <FILENAME>

FIELDNAME is the field that you want the where place on and FILENAME is the FILEDEF name that points to the file.

Hope this helps
 
Posts: 865 | Registered: May 24, 2004Report This Post
<Kalyan>
posted
You can also try something like this...
SQL
SELECT * FROM TABLE1 WHERE NEWITEM IN (SELECT ITEMS FROM TABLE B )
TABLE
ON TABLE HOLD AS HOLD1
END

TABLE FILE HOLD1
PRINT *
END
 
Report This Post
Gold member
posted Hide Post
I would just add to Kalyan's answer that once you create 'Hold1', it is available to be reported against for the remainder of your file. So, once you create hold1, you can run as many reports against it as you see fit. In WebFOCUS, though, you will have to do all of the reports in one fex if you don't FILEDEF the results set (which is a whole other issue), so I'd stick with just writing numerous reports in one fex for now until you get the feel of it.
 
Posts: 90 | Registered: April 15, 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     multiple queries in a report procedure

Copyright © 1996-2020 Information Builders