how to handle no data found exception when the function return date ?
How to handle no data found exception when the function return date and there is no data found
i handled it with sysdate but i want to retrieve nothing when no data found not display the sysdate
here is the code
CREATE OR REPLACE FUNCTION XX_GET_TRX_DATE_RCV_FUNCTION
(P_ORG IN number,P_N_ITEM IN number,P_PO_NO IN number)
RETURN DATE
IS
vb_trx_date DATE;
BEGIN
------------------ Description -------------------------
-- This function returns the qty recieved DATE from a specific PO
--------------------------------------------------------
if P_PO_NO is null
then return null;
else
select TRANSACTION_DATE