help with a parameter in a query
helloi have parameter in a SQL query
i need to retrieve the results whereas the parameters hold a value
but if the parameter doesn't hold any value
i want to retrieve all results i want to omit the statement of the parameter
Notice that my relevant statement in the blue bold line
here is my query
select
initcap(x_header.EVENT_TYPE_CODE) type_indicator,
-- 'Apply/u PrePayement' type_indicator,
to_char(inv.invoice_num) invoice_or_check_number,
x_header.ACCOUNTING_DATE AS_GL_date,
x_lines.UNROUNDED_ACCOUNTED_DR amount_dr_usd,
x_lines.UNROUNDED_ACCOUNTED_CR amount_cr_usd,
0