Hello All,
I have a checkbox group as below which returns numeric value as 0,1,2,3,4,5

select distinct studyid,clinical_er from cancer_kk.pwp_demog
where instr(':'||:ER||':',':'||CLINICAL_ER||':') >0
My checkbox group name is ER.
My query for IR is
select distinct studyid,clinical_er from cancer_kk.pwp_demog
where instr(':'||:ER||':',':'||CLINICAL_ER||':') >0
The above query works fine when something is selected in checkbox. But when none of them is selected I want to display all values instead of none. I tried nvl(:ER,clinical_ER) but it wont work for in operator. When more than 1 selected it returns invalid number error.
Can anyone please help me on this. When none of them selected i want to diaplay all records and something is selected and it should obey as per the selection.
Thanks!