I am learning cursors and I cannot print the boolean value in the
dbms_output.put_line();
The code is
DECLARE
CURSOR c_employees_3i is
SELECT * FROM employees_3i;
row_count BOOLEAN;
BEGIN
OPEN c_employees_3i;
row_count := c_employees_3i%isopen;
Dbms_Output.put_line(bool_to_text(row_count));
CLOSE c_employees_3i;
END;
I get this error
ORA-06550: line 8, column 22:
PLS-00201: identifier 'BOOL_TO_TEXT' must be declared
ORA-06550: line 8, column 1:
PL/SQL: Statement ignored
Please help me to rectify the error. Thanks
The function bool_to_text
does not exist (and AFAIK, Oracle never had such a function).
You can use diutil.bool_to_int
to convert the Boolean to an Integer and print that:
begin
dbms_output.put_line(sys.diutil.bool_to_int(true));
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With