Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Call a PL/SQL External function that returns a boolean???

132 views
Skip to first unread message

Terry Dykstra

unread,
Jul 16, 2003, 10:32:19 AM7/16/03
to
PLSQL supports Boolean internally, but plain old SQL doesn't.

--
Terry Dykstra (TeamSybase)
Techwave 2003 (PWB511: You Can Do That in InfoMaker? Cool!)
http://powerbuilder.codeXchange.sybase.com/
http://www.pb9books.com

<Alex_Osin> wrote in message
news:C8A3B9AFBF49EAE000519A9485256D65.0030EEF385256D65@webforums...
> JeePee,
>
> <> Why? <>
>
> boolean is not a SQL datatype.
>
> Oracle RDBMS doesn't have a boolean datatype.
>
> <> Have you a solution? <>
>
> 1. Recreate function using valid SQL datatype (NOT PLSQL).
>
> 2. Create "wrapper" to call your boolean function and return
> valid SQL datatype (VARCAHAR2 or CHAR or NUMBER).
>
> HTH
> Alex Osin
>


Alex_Osin

unread,
Jul 16, 2003, 10:51:20 AM7/16/03
to

jeepee

unread,
Jul 16, 2003, 4:17:41 AM7/16/03
to
Hi,
I have some problem to call a PL/SQL function that returns a boolean.
I have declare an external function like this:


FUNCTION BOOLEAN lef_CheckVATNumber_b(STRING as_VATNumber) RPCFUNC ALIAS
FOR "~"PCK_BO_IMMUNITY~".~"SF_CHECKVATNUMBER~""

...and when I call the function like this:

lb_Return = SQLCA.lef_CheckVATNumber_b(ls_param)

... I have the following error message in SQLCA.SQLErrText (SQLCA.SQLCode
is equal -1 of course):

ORA-06550: line 1, column 22:
PLS-00382: expression is of wrong type
ORA-06550: line 1, column 15:
PL/SQL: Statement ignored

Why?
Have you a solution?

Thanks

JeePee

0 new messages