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 need to migrate some MS SQL server queries to WebFOCUS. I'm not very familiar with the WebFOCUS reporting language so I'm trying to use the SQL translator to convert it to Oracle. However, I'm running into problems.
Here is one of the queries I'm trying to convert..
SELECT Year(DateAdd("m",3,[Approval_Date])) AS FY, Count(COPY_RIGHT_NUMBER) AS [Count of Copyrights] FROM TBLCO_BASE WHERE (((APPROVAL_DATE) Is Not Null)) GROUP BY Year(DateAdd("m",3,[Approval_Date])) ORDER BY Year(DateAdd("m",3,[Approval_Date])) DESC;
This is what I'm trying to do...
SQL
SELECT YEAR(ADD_MONTHS(Approval_Date,3)) AS FY, COUNT(COPY_RIGHT_NUMBER) AS COUNT FROM TBLCO_BASE WHERE APPROVAL_DATE IS NOT NULL GROUP BY Year(ADD_MONTHS(Approval_Date,3)) ORDER BY Year(ADD_MONTHS(Approval_Date,3)) DESC;
END
I'm receiving error messages because it doesn't recognize the Oracle Add_months() function. Can anyone show me a different way to convert this query to Oracle or even the WebFOCUS language.
Thanks Cyril. I tried that and it is now telling me that the table doesn't exist. Can you show me what that query would look like in WebFOCUS language? I would then be able to use it as a template to convert the others and not have to use the SQL translator.
You can directly write the oracle sql query as follows:
SET SQLENGINE=SQLORA SQL SQLORA SELECT YEAR(ADD_MONTHS(Approval_Date,3)) AS FY, COUNT(COPY_RIGHT_NUMBER) AS COUNT FROM <username.>TBLCO_BASE<@listenername> WHERE APPROVAL_DATE IS NOT NULL GROUP BY Year(ADD_MONTHS(Approval_Date,3)) ORDER BY Year(ADD_MONTHS(Approval_Date,3)) DESC ; TABLE FILE SQLOUT PRINT * ON TABLE SET ONLINE-FMT HTML END -RUN
Note that the table name is now owner.table@listner.
If the above method is not working try the following also
SQL SQLORA SET SERVER <listener> SQL SQLORA SELECT YEAR(ADD_MONTHS(Approval_Date,3)) AS FY, COUNT(COPY_RIGHT_NUMBER) AS COUNT FROM TBLCO_BASE WHERE APPROVAL_DATE IS NOT NULL GROUP BY Year(ADD_MONTHS(Approval_Date,3)) ORDER BY Year(ADD_MONTHS(Approval_Date,3)) DESC ; TABLE FILE SQLOUT PRINT * ON TABLE SET ONLINE-FMT HTML END -RUN
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004
Guys for some reason when I run the following code, I only get about 15 returns, when it should be way more, any clues?
SQL SQLORA SELECT KEY FROM CAR WHERE CARYEAR = '2007' AND COST > 100;
TABLE FILE SQLOUT PRINT * END
I've already verified by running the script outside of focus, but is there a limit for the return length for SQLOUT?This message has been edited. Last edited by: gregson06,