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.
Hi, I have a problem with date in WF769. Im trying to fetch the date using a SQL and formatting it to MM-DD-YYYY but it is giving me junk cahracters. Any help on this would be great.
SQL SQLORA
SELECT TO_CHAR(T2.WK_BEG_D,'MM-DD-YYYY') WEEK_BEG_D, TO_CHAR(SYSDATE,'MM-DD-YYYY') CURR_DATE, T2.ACCT_MO_N
AS MONTH_NAME FROM ACCT T1, ACCT T2
WHERE T2.ACCT_D = (T1.WK_BEG_D-1)
AND T1.ACCT_D = TO_CHAR(SYSDATE, 'DD-MON-YY' );
TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &WEEK_BEG_D.A10. &CURR_DATE.A10. &MONTH_NAME.A10.
-TYPE &CURR_DATE
I get the following error
001001-29- (FOC1400) SQLCODE IS 1843 (HEX: 00000733) : ORA-01843: not a valid month L (FOC1406) SQL OPEN CURSOR ERROR. : SQLOUT
Thanks in advance LGThis message has been edited. Last edited by: Kerry,
This is what i get when i ?FF WEEK_BEG_D E01 A10V CURR_DATE E06 A10V
Not sure what the V in A10V stands for....Any help?
I have been struggling with this for quite sometime, all only to fetch the current date from DB in the desired format and display on the report Any help??
The V stands for Variable. That means that the data is stored in the hold file preceded by a 6 character number that indicates the length of the field. So in your case is will be 6 bytes length, 10 bytes for WEEK_BEG_D, 6 bytes length and 10 bytes for CURR_DATE. Your read statement should therefor be:
-READ HOLD &var.6. &WEEK_BEG_D.10. &var.6. &CURR_DATE.10.
this should produce the desired result.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
The error suggests the problem is in the Oracle SQL pass-through step, not in the WebFOCUS step. Run the SQL pass-through step alone - you should still get the Oracle error.
SQL SQLORA
SELECT TO_CHAR(T2.WK_BEG_D,'MM-DD-YYYY') WEEK_BEG_D, TO_CHAR(SYSDATE,'MM-DD-YYYY') CURR_DATE, T2.ACCT_MO_N
AS MONTH_NAME FROM ACCT T1, ACCT T2
WHERE T2.ACCT_D = (T1.WK_BEG_D-1)
AND T1.ACCT_D = TO_CHAR(SYSDATE, 'DD-MON-YY' )
AND (ROWNUM < 10);
END
You are working with several dates, perhaps one of them does not contain the data or is not in the format you expect.
I would start by simplifying the SQL - remove the TO_CHAR functions, then start adding them one at a time until the error occurs.
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