List of Value Type: Pl/SQL Function Body Returning SQL
Declare
v_type varchar2(1) := :P45_RETURN_TYPE;
Begin
If v_type = 'C' then
Return 'SELECT CUSTOMER_ID R,CUSTOMER_NAME D,CUSTOMER_NAME,CUSTOMER_PHONE,CUSTOMER_ADDRESS
FROM CUSTOMER_INFORMATION WHERE CUSTOMER_ID IN(SELECT CUSTOMER_ID FROM INVOICE_MASTER)'
-- where some_column = ''CONDITION 1''
;
Else
Return 'SELECT SUPPLIER_ID R,SUPPLIER_NAME D,SUPPLIER_NAME,SUPPLIER_PHONE,SUPPLIER_ADD
FROM SUPPLIER_INFORMATION WHERE SUPPLIER_ID IN(SELECT SUPPLIER_ID FROM PRODUCT_RECEIVE_MASTER)'
--where some_column = ''CONDITION 2''
;
End if;
End;
No comments:
Post a Comment