Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Returning TRUE and FALSE in Oracle 7.1.5.2.3
A copy of this was sent to gennick_at_worldnet.att.net (Jonathan Gennick)
(if that email address didn't require changing)
On 17 Oct 1998 22:25:22 GMT, you wrote:
>On 16 Oct 98 21:25:31 GMT, reichmanm_at_removethis.rl.af.mil.
>(Mark S. Reichman) wrote:
>
>>These functions are being called from an Oracle 3.0 form. Maybe that
>>has something to do with it. Does this early version of Oracle understand the
>>PL/SQL variables TRUE and FALSE.
>
>I don't know much about Oracle Forms, but the database
>itself does not recognize the boolean datatype. You can't
>create a store function that returns a boolean value. At
>least, i've never been able to.
>
>Jonathan
>
booleans cannot be stored in a table in 7.x as a native datatype, this is true. However, pl/sql functions may certainly return booleans as demonstrated. I don't know what issue there might be with 7.1.5 and forms 3.x with booleans, however, booleans are defintely allowed.
$ sqlplus scott/tiger
SQL*Plus: Release 3.1.3.7.1 - Production on Sat Oct 17 21:19:40 1998 Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
Connected to:
Oracle7 Server Release 7.1.6.2.0 - Production Release
With the distributed, replication and parallel query options
PL/SQL Release 2.1.6.2.0 - Production
SQL> create or replace function bool return boolean
2 as
3 begin
4 return FALSE;
5 end;
6 /
Function created.
SQL> begin
2 if ( bool ) then 3 dbms_output.put_line( 'True is returned...' ); 4 elsif ( NOT bool ) then 5 dbms_output.put_line( 'False is returned...' ); 6 end if;
PL/SQL procedure successfully completed.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
--
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Oct 17 1998 - 20:43:22 CDT