Home » SQL & PL/SQL » SQL & PL/SQL » Using a boolean in a stored function
Using a boolean in a stored function [message #6792] Tue, 06 May 2003 10:16 Go to next message
Julie Zolnowski
Messages: 9
Registered: April 2002
Junior Member
I am trying to update a field using a stored function. The problem is with the last parameter "true". The function requires a Boolean value, but TOAD and SQLPlus think I'm trying to reference a field called "true" from the cnv_xbt table. Do you know of a way that I can tell the interpreter that I want a Boolean value and not a field value?

UPDATE cnv_xbt

SET l_per_person = xxx_conversion_sf('CVTRXBT1',
l_data_source
,'PERSON'
,l_feerf
,true) ;
Re: Using a boolean in a stored function [message #6794 is a reply to message #6792] Tue, 06 May 2003 12:28 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
A Boolean datatype is only valid in a PL/SQL context, not a SQL context (which is what your UPDATE statement is).

This statement would not be valid even if there was no column TRUE in the table.

One option: Create a wrapper function that calls your existing function. The wrapper will use 0/1 or 'N'/'Y' in place of the boolean datatype and translate the supplied value when calling the existing function.
Previous Topic: Send Text File As Attachment from AIX OS
Next Topic: Formatting 3 Column Report
Goto Forum:
  


Current Time: Wed Apr 24 15:06:44 CDT 2024