Hi ,
Can we assign True/Flase values into boolean variable in PL/SQL block by using SELECT statement ?
declare
v_b1 boolean;
v_b2 boolean;
begin
v_b2 := sys.diutil.int_to_bool(1);
-- select sys.diutil.int_to_bool(0) into v_b1 from dual;
if v_b1 = TRUE then
dbms_output.put_line('TRUE');
else
dbms_output.put_line('FALSE');
end if;
if v_b2 = TRUE then
dbms_output.put_line('TRUE');
else
dbms_output.put_line('FALSE');
end if;
end;
The above block was working fine, if it is direct assignment.But not working for select statements.
Please explain the logic behind this
Thanks
Sai Pradyumn