Conditional Query not working $if{$elseif{$else Exception invalid statement
Hi,
I tried doing a basic conditional query in Oracle Fusion OBIEE but I am getting invalid statement error.
Below is the query for reference:
$if{ (:P_CLASS == 'INV') }$
select distinct * from RA_CUSTOMER_TRX_ALL Where trx_class = 'INV'
$elsif{ (:P_CLASS == 'DM') }
select distinct * from RA_CUSTOMER_TRX_ALL where trx_class = 'DM'
$else{
select distinct *
from RA_CUSTOMER_TRX_ALL
Where trx_class = 'CM'}
$endif$
Regards,
Manish Singh