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.
I've created a WebFOCUS subquery file - (.sql) and the corresponding synonym (.mas/.acx) - AOK, as I can run it successfully from a TABLE FILE command.
Currently in the .sql file is command like 'WHERE T1."CAR" = 'AUDI''.
Can I make the hardcoded 'AUDI' a variable that I'd pass from the focexec?
I tried using an amper variable, but the system, understandably, thought I meant 'WHERE T1."CAR" = &CAR'.This message has been edited. Last edited by: <Kathryn Henning>,
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
Went to the health club during lunch, and the answer came to me while on the rowing machine. (And here I thought nothing good ever came out of excercising.)
Rather than creating the .sql/.acx/.mas in an application folder, I instead create them via the 'ON TABLE HOLD AS n FORMAT SQL_SCRIPT' TABLE FILE subcommand.
The TABLE creating the SQL Script has the dynamic filtering I need to do.
By definition, the .sql./.acx/.mas are stored temporarily/for a particular run like all HOLD files.
Once the TABLE creating the script and synonym is done, I then bring the script into the next table via the DB_INFILE function, to create my required nested query.
So it looks like I'm set.
Anyone else using WF generated SQL scripts?
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
Here is an example of creating a subquery to be used in a nested subquery SELECT:
The example is running against the AdventureWorks2014 MS SQL Server sample database.
-*
-* Create a subquery (.sql/.mas/.acx) and store in temporary space.
-*
TABLE FILE PRODUCTSUBCATEGORY
PRINT PRODUCTSUBCATEGORYID
WHERE NAME EQ 'Road Bikes'
ON TABLE HOLD AS SUBCATID FORMAT SQL_SCRIPT
END
-RUN
-*
-* Create a report from the PRODUCT table, using a nested subquery.
-*
TABLE FILE PRODUCT
"Report Product Data for 'Road Bikes'"
PRINT PRODUCTID
NAME
PRODUCTSUBCATEGORYID
WHERE DB_INFILE(SUBCATID, PRODUCTSUBCATEGORY, PRODUCTSUBCATEGORY)
WHERE READLIMIT EQ 2
END
Report results:
Report Product Data for 'Road Bikes'
PRODUCTID NAME PRODUCTSUBCATEGORYID
749 Road-150 Red, 62 2
750 Road-150 Red, 44 2
With SQL tracing ON, here is what the created subquery looks like, as well as, the SELECT that actually pulls data from the database:
SELECT
(T1."ProductSubcategoryID") AS E01
FROM
AdventureWorks2014.Production.ProductSubcategory T1
WHERE
(T1."Name" = 'Road Bikes');
(FOC2546) SQL SCRIPT SUBCATID.SQL CREATED SUCCESSFULLY
SELECT
TOP 2 T1."ProductID",
T1."Name",
T1."ProductSubcategoryID"
FROM
AdventureWorks2014.Production.Product T1
WHERE
(T1."ProductSubcategoryID" IN ( SELECT
(T1."ProductSubcategoryID") AS E01
FROM
AdventureWorks2014.Production.ProductSubcategory T1
WHERE
(T1."Name" = 'Road Bikes')));
I want to find out who at IB implemented FORMAT SQL_SCRIPT, so I can take them to a White Sox game, and then to Billy Goat's the next time they are in Chicago. :-)