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.
Can somebody tell me how to blend SQL and WebFOCUS together? For example, if I want to have my joins in SQL and proceed with the result of the join with WebFOCUS. Any configuration needed or you can just embed SQL with WebFOCUS?
You need to have the SQL PASSTHRU set to ON in the environment. Here is an example.
SET SQLENGINE = SQLMSS SQL SELECT ctc.c_last_name, count(isl.id) as total FROM AHD.ctct ctc, AHD.issalg isl, AHD.issue iss WHERE ctc.id=isl.analyst AND isl.issue_id =iss.persid AND isl.type = 'INIT' AND isl.time_stamp > '1128211200' AND iss.close_date > '1128211200' AND iss.requestor IN (SELECT id FROM AHD.ctct ctc WHERE ctc.c_ctp_id = '2305') Group by ctc.c_last_name Order by total desc FOR FETCH ONLY WITH UR; TABLEF FILE SQLOUT PRINT * ON TABLE HOLD AS RGSQLOUT FORMAT ALPHA END TABLE FILE RGSQLOUT PRINT * WHERE READLIMIT EQ 100 END
Posts: 176 | Location: Desplaines | Registered: August 05, 2004
You need to have the SQL PASSTHRU set to ON in the environment. Here is an example.
SET SQLENGINE = SQLMSS SQL SELECT ctc.c_last_name, count(isl.id) as total FROM AHD.ctct ctc, AHD.issalg isl, AHD.issue iss WHERE ctc.id=isl.analyst AND isl.issue_id =iss.persid AND isl.type = 'INIT' AND isl.time_stamp > '1128211200' AND iss.close_date > '1128211200' AND iss.requestor IN (SELECT id FROM AHD.ctct ctc WHERE ctc.c_ctp_id = '2305') Group by ctc.c_last_name Order by total desc; TABLEF FILE SQLOUT PRINT * ON TABLE HOLD AS RGSQLOUT FORMAT ALPHA END TABLE FILE RGSQLOUT PRINT * WHERE READLIMIT EQ 100 END
Posts: 176 | Location: Desplaines | Registered: August 05, 2004
I had already tried that from looking at the old posts but I still couldnt get it to work. For example I get this error: "(FOC012) THE WORD 'FILE' OR THE FILENAME APPEARS TWICE BYPASSING TO END OF COMMAND"
How do you set SQL PASSTHRU to ON? Is there any way of knowing if your configuration is set to be used for SQL and WebFOCUS code?
You can actually do that in FOCUS without worrying about SQL. If you want just 2 columns, one with last name (from both tables and one with first from both tables, TABLE FILE NAMES1_TABLE
Posts: 60 | Location: 2 penn | Registered: May 22, 2003
A Data Connection is just what it indicates - a connection to the database. WebFocus doesn't know which database you wish to use unless you (or your WebFocus Administrator) creates a Data Connection. As a simple test - if you can query any table in a given database with WebFocus then you already have a connection. If you cannot access any tables via WebFocus then you probably need a Data Connection. Speak with your WebFocus Administrator.
The member "newtofocus" demonstrates the WebFocus SQL Passthru syntax more elaborately that my previous post. The query also demonstrates SQL Joins. What you may (and I emphasize the word "may") be missing is either a Data Connection or the ENGINE SQLMSS statement. (See my previous post.) The ENGINE SQLMSS statement isn't always needed, but I have found that it sometimes makes the difference.
Regarding Noreen's suggestion, both MORE and MATCH will combine several result sets together. MORE requires the each result set to have the same file structure whereas MATCH requires each result set to have the same BY field.
If these suggestions don't achieve the desired result, please elaborate on your requirement.