Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: how do you print (check for) boolean value?

Re: how do you print (check for) boolean value?

From: Sharkie <sharkie2_at_my-deja.com>
Date: 2000/03/02
Message-ID: <89mof4$7rf$1@nnrp1.deja.com>#1/1

You're wrong, it does. I think it's a new thing for Oracle 8. We're using it in our PL/SQL procedures, and it works.

In article <89mlap$5ck$1_at_nnrp1.deja.com>,   jbrychka_at_my-deja.com wrote:
> Oracle does not use boolean data types.
>
> In article <89mb3s$t26$1_at_nnrp1.deja.com>,
> Sharkie <sharkie2_at_my-deja.com> wrote:
> > 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.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US