0

How I can use case statment in BIP App after where and compare it to a date if is the date is null show Full data if he ask for Specific date display the data for the date that he asked for

Yousef
  • 1
  • Please include sample data and expected results. How is this scenario different in BI Publisher compared to regular SQL? How is PL/SQL programming involved? – William Robertson May 29 '22 at 21:29

1 Answers1

0

Didn't understand the question but if you think of using case in where clause it could be something like this:

--  ...
WHERE
    something = CASE 
                    WHEN Nvl(date_column, To_Date('01.01.2099', 'dd.mm.yyyy') <= other_date_column -- or parameter or date calculation .....    
                    THEN something 
                ELSE 
                    something_else 
                END
--  ...

It depends what you want to do when one of comparing dates is null, but if it is null, you could use Nvl() function to create a date that is for sure out of scope and make it '=' or '<=' or '>=' or ... to the comparing value. This way you can manage the expresion and do the job. This is definitely sql question. Regards...

d r
  • 3,848
  • 2
  • 4
  • 15