Focal Point
SQL STOPPED WORKING

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1241059572

March 13, 2008, 10:02 AM
k8iw
SQL STOPPED WORKING
Francis et. al.,

After I got the embedded SQL to work once, the next day it stopped working again. I don't think I changed anything and I have verified I can hit each of the tables individually. Right now it just returns NO HTML OUTPUT. At some point it also said EDA no data. Please take a look. Hopefully it is just syntax???

SET SQLENGINE = SQLORA
-*SET DEFAULT_CONNECTION OOIFAS
SQL SET SERVER OOIFAS
-RUN
-*SQL SQLORA PREPARE SQLOUT FOR
SQL SQLORA
Select Description, Beginning_balance,Realized,unRealized_pl, UNRELAIZED_OCI,
purchases,issuances,sales,Settlements,activity,
transfer_in,transfer_out, net_transfers,
ending_balance
from (
select d.Description, c.disclosure_group_seq_id,c.disclosure_line_seq_id,d.sortby_order,
Sum(Beginning_balance) Beginning_balance,Sum(Realized) Realized,Sum(unRealized_pl) unRealized_pl,
Sum( UNRELAIZED_OCI) UNRELAIZED_OCI, sum(purchases) purchases, sum(issuances) issuances,sum(sales)
sales,sum(Settlements) Settlements,sum(activity) activity, sum(transfer_in)
transfer_in,sum(transfer_out) transfer_out,sum(transfer_in)+sum(transfer_out) net_transfers,
sum(ending_balance) ending_balance
from FAS157.bkt_category_disclose_xref a,
FAS157.rollforward_output b,
FAS157.disclosure_item_xref c,
FAS157.disclosure_line d,
FAS157.disclosure_table e
Where a.master_bucket_seq_id = b.master_bucket_seq_id
and a.master_portfolio_seQ_id = b.master_portfolio_seq_id
and a.master_category_seq_id = b.master_category_seq_id
and b.enterprise_system_seq_id = 2
and a.bkt_cat_pfolio_xref_Seq_id = c.bkt_cat_pfolio_xref_seq_id
and c.disclosure_line_seq_id = d.disclosure_line_seq_id
and c.disclosure_table_seq_id = e.disclosure_table_Seq_id
and e.table_name like '2.1%'
group by d.Description, c.disclosure_group_seq_id,c.disclosure_line_seq_id,d.sortby_order) a
order by sortby_order;
TABLE ON TABLE HOLD AS HOLD01 FORMAT ALPHA
END
-RUN
TABLE FILE HOLD01
PRINT *
END
-RUN


Mike Anderson
March 13, 2008, 10:15 AM
GamP
Could it have something to do with the UNRELAIZED_OCI field? Should it really be typed that way or should it acrtually be UNREALIZED_OCI?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 13, 2008, 10:25 AM
Francis Mariani
quote:
EDA no data
means no data was retrieved, based on the selection criteria and joins. If you got no other error messages, then the request ran, unless you have "SET XRETRIEVAL=OFF" before the request - no data is retrieved.

Check for other messages.


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
March 13, 2008, 10:40 AM
smiths
Mike,

Confirm that your query is returning no records by running the SQL component in an Oracle client such as Golden or Toad.

I'm guessing that your data may have changed from yesterday such that one of the tables in the join has no records, or at least one of the filters you are using does not qualify any records.

I'd remove a filter at a time and see if any records pop up. Once you see records, you'll know which filter is causing no records to be qualified.

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
March 13, 2008, 10:54 AM
k8iw
Hey Sean et. al.,

It's always the obvious stuff that gets you. I did as you suggested - started taking out the 'where' type checks and voila. Now it is just a matter of pinpointing where this query asks for something it shouldn't. At least we know the SQL reporting functionality vs these tables is there. Just need to fix the query.

Thanks again.

Mike


Mike Anderson
March 13, 2008, 10:59 AM
smiths
Glad to help Mike.

Sometimes our ETL folks run jobs that change a column of data that needed to be left as is, causing no records to be returned. So that's how I pinpoint the problem and advise them what column they need to address.

Regards,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode