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 tried to use SQL UPDATE but kepp getting error message as below:
1 0 NUMBER OF RECORDS IN TABLE= 201 LINES= 4 (FOC14069) SQL SYNTAX ERROR ON LINE 99 AT 'K'
I created a hold file as 2012CK then created another small (4 records) hold file 2012FIX.
Then trid to use UPDATE to update 2012CK.
-***********************************************
TABLE FILE 2012CK SUM COMPUTE AMT/D15.2CBM = AMOUNT;AS 'AMT' BUSINESS_UNIT JOURNAL_DATE MONEY_AMOUNT AMOUNT VOUCHER_ID VOUCHER_LINE_NUM DISTRIB_LINE_NUM SRC_SYS_ID POSTING_DATE INVOICE_DT INVOICE_ID VENDOR_ID NAME1 DESCR VNDR_LOC BUSINESS_UNIT_PO PO_ID ACCOUNTING_DT DUE_DT ENTERED_DT BY FISCAL_YEAR BY MON_PERIOD BY DEPTID BY ACCOUNT BY PROGRAM_CODE BY JOURNAL_DATE BY JOURNAL_ID BY JOURNAL_LINE BY VENDOR_ID BY NAME1 WHERE RANK EQ 88888 WHERE TOTAL AMT NE 0 ON TABLE HOLD AS 2012FIX END -RUN -RUN
SQL UPDATE 2012CK K INNER JOIN 2012FIX F ON (K.FISCAL_YEAR = F.FISCAL_YEAR) AND (K.MON_PERIOD = F.MON_PERIOD) AND (K.DEPTID = F.DEPTID) AND (K.ACCOUNT = F.ACCOUNT) AND (K.PROGRAM_CODE = F.PROGRAM_CODE) AND (K.JOURNAL_DATE = F.JOURNAL_DATE) AND (K.JOURNAL_ID = F.JOURNAL_ID) AND (K.JOURNAL_LINE = F.JOURNAL_LINE) AND (K.FUND_CODE = "8080") AND (K.RNAK = 0) AND (K.JOURNAL_ID LIKE "AP*")
It looks like 2012FIX is a binary WebFOCUS HOLD file, which you cannot use in the SQL UPDATE statement - you can join to a table that is of the same dbms type and the one you're updating by the UPDATE statement. Also, are you sure of the UPDATE statement using INNER JOIN?
If this is SQL Server, you may be able to create a temporary table and use that in the inner join...
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
As Francis said -- there is a problem with the whole approach. You said you created two HOLD files (2012CK and 2012FIX) and since you are not HOLDing them as native SQL tables you cannot use the UPDATE syntax on them. If they are Binary/FOCUS HOLD files you can use MODIFY or best still apply your manipulations to 2012CK in DEFINE's and HOLD it as a new file. If you want to UPDATE the source SQL tables then you need to create temp SQL table or update using amper variables as values.
thanks Sashanka
WF 7.7.03/Windows/HTML,PDF,EXL POC/local Dev Studio 7.7.03 & 7.6.11
Jean - Wu, as Sashanka mentioned, you cannot use SQL UPDATE with a FOCUS database. Use MODIFY FILE instead. There are many examples of this in the forum.
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