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] Developer's block

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Developer's block
 Login/Join
 
Silver Member
posted
I have a seemingly simple problem but I think due to lack of sleep I am missing the obvious.

I have a table that contains Vendors, invoices and invoice amounts and I am trying to write a query to solve a problem with duplicate payments. To search for duplicates, I am needing to query the table and return only records where the Invoices #'s are different with the same transaction $ amount for the same vendor.

For example in the list below, the $10 and $25 dollar transactions would be included on the query results.

Vendor 1 INV1234 $10.00
Vendor 1 INV4567 $50.00
Vendor 1 INV8999 $10.00
Vendor 2 INV5555 $25.00
Vendor 2 INV6666 $25.00
Vendor 2 INV0000 $30.00

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


Linux x86
Apache
Excel, CSV, HTML, PDF
 
Posts: 31 | Registered: September 29, 2010Report This Post
Expert
posted Hide Post
Something along the lines of:
TABLE FILE ???
SUM COMPUTE TOTDOLLAR/P20.2M = DOLLARAMT ;
BY VENDOR
PRINT DOLLARAMT
      COMPUTE FILTER/A1 = IF TOTDOLLAR NE DOLLARAMT THEN 'Y' ELSE 'N' ;
BY VENDOR
BY INVOICE
WHERE TOTAL FILTER EQ 'Y'
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Try this:
-* SORT the file by vendor and amount
TABLE FILE INVOICEFL
PRINT INVOICE_NO
BY VENDOR_NO
BY AMOUNT
ON TABLE HOLD AS MYFILE
END
-* PRINT THE DUPS
DEFINE FILE MYFILE
LST_INV/A10=IF VENDOR_NO EQ LAST VENDOR_NO AND AMOUNT EQ LAST AMOUNT THEN LAST INVOICE_NO ELSE '';
END
TABLE FILE MYFILE
PRINT INVOICE_NO LST_INV
BY VENDOR_NO
BY AMOUNT
WHERE VENDOR_NO EQ LAST VENDOR_NO AND AMOUNT EQ LAST AMOUNT AND INVOICE_NO NE LAST INVOICE_NO
ON TABLE PCHOLD
END


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Master
posted Hide Post
This will return the rows where the vendors are the same, the amounts are the same and the invoice numbers are different. Rows where all 3 fields are the same are not returned:
 TABLE FILE FPDATA
 COUNT INVOICE NOPRINT
    BY VENDOR
    BY DOLLARAMT
   SUM MAX.INVOICE NOPRINT
    BY VENDOR
    BY DOLLARAMT
    BY INVOICE
 WHERE TOTAL CNT.INVOICE GT 1
    ON TABLE SET HOLDLIST PRINTONLY
    ON TABLE HOLD
 END
-*
 TABLE FILE HOLD
 COUNT INVOICE 
    BY VENDOR
    BY DOLLARAMT
   SUM MAX.INVOICE NOPRINT
    BY VENDOR
    BY DOLLARAMT
    BY INVOICE
 WHERE TOTAL CNT.INVOICE GT 1 ;
 END


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Member
posted Hide Post
TABLE FILE ?????
SUM CNT.INVOICE NOPRINT
BY VENDOR NOPRINT
BY TRANSACTION_AMOUNT NOPRINT
PRINT VENDOR INVOICE TRANSACTION_AMOUNT
BY VENDOR NOPRINT
BY TRANSACTION_AMOUNT NOPRINT
WHERE TOTAL CNT.INVOICE GT 1;
END
 
Posts: 17 | Location: Colorado, USA | Registered: January 22, 2010Report This Post
Virtuoso
posted Hide Post
lots of solutions
the solution of WAZ holds a little mistake, but is in the basic very simple...

BY INVOICE should be imho BY DOLLARAMT




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
Thanks to all who responded. I used a combo of some of the suggestions to get to the data I needed. Thanks!


Linux x86
Apache
Excel, CSV, HTML, PDF
 
Posts: 31 | Registered: September 29, 2010Report 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] Developer's block

Copyright © 1996-2020 Information Builders