SQL Language (MOSC)

MOSC Banner

help with a parameter in a query

edited Jan 27, 2014 1:31AM in SQL Language (MOSC) 13 commentsAnswered ✓
 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,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center