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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SQL Help
 Login/Join
 
<d3nis370>
posted
I am trying to get this SQL to work in WF but I keep getting this error.


SELECT SUM(PC_PREMIUM_AMOUNT + PC_FEE_AMOUNT + PC_TAX_AMOUNT)
       , SUM(PC_PREMIUM_AMOUNT)PREM, SUM(PC_FEE_AMOUNT)FEE
       , SUM(PC_TAX_AMOUNT)TAX
FROM FMR003, FMR002
WHERE  PC_VSI_POLICY_NO = PT_VSI_POLICY_NO
       AND PC_POLICY_SEQ = PT_POLICY SEQ
       AND PC_TRAN_SEQUENCE = PT_TRAN_SEQUENCE
       AND PC_SUB_SEQUENCE = PT_SUB_SEQUENCE
       AND PC_TRAN_DATE = 1100226
       AND SUBSTR(PC_TRAN_TYPE,1,1)NOT IN ('V','P')
       AND PC_FUNDED_DATE > 0
       AND SUBSTR(PC_TRAN_TYPE,2,1) != 'R'
;


(FOC1400) SQLCODE IS -104 (HEX: FFFFFF98)
: [42601] Token SEQ was not valid. Valid tokens: FOR SKIP WITH FETCH ORDER
: UNION EXCEPT OPTIMIZE.
L (FOC1405) SQL PREPARE ERROR.
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
BYPASSING TO END OF COMMAND

Can anyone help?

This message has been edited. Last edited by: Kerry,
 
Report This Post
Expert
posted Hide Post
Would you say there's something wrong with this line?

AND PC_POLICY_SEQ = PT_POLICY SEQ

Missing underscore between POLICY and SEQ perhaps?

42601 is a DB2 SQl error, not a WebFOCUS error.


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
Virtuoso
posted Hide Post
Could you post the whole section of code you're running? It's easier to evaluate the case in a proper context.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Francis, can you recommend an eye specialist? Yours is great Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
<d3nis370>
posted
Well I feel dumb it was just the missing underscore.It all works fine now.
Thanks Francis and njsden
 
Report This Post
Expert
posted Hide Post
My eyes are getting worse! But I noticed the error 42601 is a DB2 SQL error and it pointed to SEQ, so I looked for SEQ in the posted code.


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
Expert
posted Hide Post
quote:
Well I feel dumb it was just the missing underscore
We all have moments like this (admit it everyone Razzer) and looking at it doesn't help. Only when you step back and really read the error message and look at it logically do you find the problem.

Of course, a fresh pair of eyes often helps Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders