Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to use NVL in where condition, manual input condition

YoungTLOct 13 2021

I want to make a jasper report used oracle db, and the condition is manual input,
if not input condition , display all the data,
if input condition ,and the condition maybe multi,
like '33,998',not include the ',
the problem is the col 'abab8' is number type, maybe the NVL return '33,998',include the ',
so i can't get the correct result,
if i use to_char(aban8), then i have no result..
any one can help me ,PLS.
select aban8,abalph from proddta.f0101
where ABAT1='V'
and NVL2(:P_aban,(aban8),1) in NVL(:P_aban,1)
o1.jpgo2.jpgo3.jpg

Comments

Post Details

Added on Oct 13 2021
4 comments
989 views