There is a table SC_SHIPPED_UNBILLED.It has columns as below in the query.
There are cases where a PRODUCT_SKU in the table has all the info populated except null for vendorpo,extd_cost,VENDOR_
CODE due to some application error.
Iam trying to display data in a report, so that when I come across null value for
for the above 4 columns for a PRODUCT_SKU,I have to display the last VENDOR_PO_NUM as a text "LAST PO DATA",the others with the latest column data for that product_sku .
Any idea on how this can be achieved at the query level itself.Iam trying to get the latest row to be shown on the report.
Basically the query used is:
CUSTOMER_CODE as CUSTOMER_NO,
EXT_UNIT_COST as EXTD_COST,
EXT_SELLING_PRICE as EXTD_SP,
(EXT_SELLING_PRICE-EXT_UNIT_COST) AS GM_DOLLAR_AMT,
WHEN EXT_SELLING_PRICE = 0 THEN 0
END AS GM_PERCENT
Iam using Oracle