0
votes

I need your help.

I have a modal dialogue. In this dialog I have, among other things, a pop-up list of values ​​and a yes / no selection. If the user chooses [YES] in the list of values, e.g. Query 1 are listed, he chooses [NO] Query two should be executed.

I have deposited a PL / SQL for this. Example: P300100_LIST

declare
    l_script varchar2 (4000);
begin

if: P300100_MY = 0 then
    l_script: = 'SELECT NAME FROM MASTER';
else
    l_script: = 'SELECT LASTNAME ON FROM MASTER';
end if;

return l_script;

end;

As I said, the script is just an example. I hope you understand what I mean? Depending on the selection, the corresponding selection list should be displayed.

1

1 Answers

0
votes

You don't need PL/SQL for that; this should do:

select name     from master where :P300100_MY = 0
union all
select lastname from master where :P300100_MY <> 0;