oracle - If statements in WHERE clause -



oracle - If statements in WHERE clause -

is possible in oracle set conditional if statements in clause?

i want filter rows end date before today. , if end date empty, should not filter on it. i've tried this:

select discount_amount vw_ph_discount_data sysdate > start_date , if end_date not empty sysdate < end_date

but "invalid relational operator".

you can try:

select discount_amount vw_ph_discount_data sysdate > start_date , sysdate < nvl(end_date,sysdate+1)

oracle

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -