What is a PeopleSoft Application Package? The top most level of an Application in PeopleSoft is the Application Package. An Application Package is a container for one or more Application Classes. Application Packages should only contain Application Classes that are related to each other based on purpose or similar functionality. What is a PeopleSoft Application […]
Problem: You need to display a result with a running total in PL/SQL query. The code below will accomplish displaying a running total in PL/SQL:
SELECT C.VENDOR_ID, C.VENDOR_NAME_SHORT, A.BUSINESS_UNIT, A.VOUCHER_ID,
A.INVOICE_ID, A.INVOICE_DT, A.GROSS_AMT,
SUM(A.GROSS_AMT) OVER (ORDER BY C.VENDOR_ID, A.BUSINESS_UNIT) "RUNNING TOTAL"
FROM PS_VOUCHER A, PS_VENDOR C
WHERE (A.PROCESS_MAN_CLOSE = 'N' OR A.CLOSE_STATUS <> 'C')
AND A.ENTRY_STATUS <> 'X'
AND A.VENDOR_SETID = C.SETID
AND A.VENDOR_ID = C.VENDOR_ID
AND C.VENDOR_ID = '0000000001'
GROUP BY C.VENDOR_ID, C.VENDOR_NAME_SHORT, A.BUSINESS_UNIT, A.VOUCHER_ID,
A.INVOICE_ID, A.INVOICE_DT, A.GROSS_AMT
ORDER BY A.GROSS_AMT, C.VENDOR_ID, A.BUSINESS_UNIT, A.VOUCHER_ID
This is a pretty simple query to show the details of a vendor balance. The column to be used in calculating the “running total” needs to be listed twice. […]
Select Top n Rows in Oracle (Retrieve only the top n rows in Oracle) [AdSense-A] From time to time you need to return the top n rows in Oracle from a table. For example “I need the top X customers from the sales table”. I know how to do this in transact-SQL but how do […]