I have an example code where I am trying to print a boolean value. This led to an error.
wrong number or types of arguments when calling 'PUT_LINE'
wrong number or types of arguments when calling TO_CHAR
DECLARE
status BOOLEAN:= false;
BEGIN
DBMS_OUTPUT.PUT_LINE(status);
DBMS_OUTPUT.PUT_LINE(to_char(status));
END;
The error message makes it clear that the Boolean cannot be converted to a character in both directions (implicit, explicit).
Why is this impossible?
Do they have any specific reasons? or Oracle just forgot about this type of conversion (its unlikely).
How is their other way to convert? Or I need to go for the operator IFor CASEto guess what it has status.
source
share