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     [SOLVED] Error preparing an SQLOUT Report using the SQL Editor

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Error preparing an SQLOUT Report using the SQL Editor
 Login/Join
 
Member
posted
Hi guys,

So there is another problem which I am stuck at. I have an SQL query (in mySQL) that works fine (the results show in the HTML web browser when testing) But when I go ahead to make the Report using SQLOUT as the table data source, it throws the error "Error Parsing MASTER File SQLOUT (0)"

My query is:

SELECT COUNT(t.business_id) as "Number of Merchants",
EXTRACT(MONTH FROM t.local_timestamp) AS "Month",
CASE
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 1 THEN 'January'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 2 THEN 'February'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 3 THEN 'March'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 4 THEN 'April'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 5 THEN 'May'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 6 THEN 'June'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 7 THEN 'July'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 8 THEN 'August'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 9 THEN 'September'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 10 THEN 'October'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 11 THEN 'November'
WHEN EXTRACT(MONTH FROM t.local_timestamp) = 12 THEN 'December'
ELSE 'Others' END,
EXTRACT(YEAR FROM t.local_timestamp),
SUM(ti.amount) as "Amount",
SUM(ti.item) as "Items Transacted"
FROM txn t JOIN txn_item ti ON t.txn_id = ti.txn_id
JOIN product p ON p.product_id = ti.product_id
WHERE p.processing_type_id not IN (36) and t.service_id = 1 and EXTRACT(YEAR FROM t.local_timestamp) = '2012'
GROUP by EXTRACT(MONTH FROM t.local_timestamp);

I have tried doing some research and it seems like Webfocus does not understand some of the code when it is preparing the SQLOUT. Could it be the EXTRACT or CASE code? As I think that is does not understand this

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Member
posted Hide Post
I have managed to make the code slightly efficient but it still gives me this error

SELECT DATE_FORMAT(t.local_timestamp,"%Y") as "Year",
DATE_FORMAT(t.local_timestamp,"%M") as "Month",
COUNT(t.business_id) as "Number of Merchants",
SUM(ti.amount) as "Amount",
SUM(ti.item) as "Items Transacted"
FROM txn t JOIN txn_item ti ON t.txn_id = ti.txn_id
JOIN product p ON p.product_id = ti.product_id
WHERE p.processing_type_id not IN (36) and t.service_id = 1 and DATE_FORMAT(t.local_timestamp,"%Y") = '2012'
GROUP by DATE_FORMAT(t.local_timestamp,"%M");


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Member
posted Hide Post
nevermind it seems to be resolved...seems to be like there is some issue with the database and not the query hence the results were failing.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: April 13, 2012Report This Post
Expert
posted Hide Post
If you're trying to create a HOLD file, perhaps this AS statement generates a funny column name in the Master...

quote:
"Number of Merchants"


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [SOLVED] Error preparing an SQLOUT Report using the SQL Editor

Copyright © 1996-2020 Information Builders