Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> how do you print (check for) boolean value?
I'm doing some debugging in a PL/SQL procedure. I'm trying to print out a boolean value to a temp table. However Oracle doesn't like it. Here's what I have:
<procedure snippet>
procedure some_procedure is
v_some_variable boolean;
begin
--some_function returns boolean value:
v_some_variable := some_function(some_parameters);
insert into temp values(v_some_variable);
end;
</procedure snippet>
When I try to compile this, Oracle responds:
<Oracle response>
(1):PLS-00382: expression is of wrong type
(2):PL/SQL: SQL Statement ignored
</Oracle response>
Is there a way to print out this value somehow? I was looking at different conversion functions, but couldn't find anything related to boolean values.
For now, what I do is:
<workaround snippet>
if (v_some_variable=true) then
insert into temp('true');
else
insert into temp('false');
endif;
</workaround snippet>
It works, but isn't there a way to check out this value directly?
-- If the human brain were so simple that we could understand it, we would be so simple we couldn't. -Makes Sense... don't it? Sent via Deja.com http://www.deja.com/ Before you buy.Received on Thu Mar 02 2000 - 00:00:00 CST
![]() |
![]() |