In Oracle, there is no function available to convert boolean to string (varchar2). You will have to use IF, CASE, or DECODE statement.
The following is a PL/SQL program to convert boolean to varchar2 string:
Example
declare b_var boolean := true; v_var varchar2(10) := case when b_var then 'true' else 'false' end; begin dbms_output.put_line(v_var); end;
Output:
true
Statement processed.
0.01 seconds
Leave a comment