Re: stored function problem

From: River <wychan_at_vol.net>
Date: Wed, 05 May 1999 20:08:39 +0800
Message-ID: <373034C7.2F1EE659_at_vol.net>


Thanks for all replies! I have solved the problem by changing RCONTENT to varchar2(10) only.

River
wychan_at_vol.net

rtproffitt_at_my-dejanews.com wrote:

> VARCHAR2 works fine, at least in Oracle 7.3... where I tested.
>
> I first reproduced the problem using your sample code.
> Then I wrote the function with varchar2 as was suggested.
> It compiled OK.
>
> Here is the text:
> CREATE OR REPLACE FUNCTION
> GET_CONTENT( SYSCODE IN VARCHAR2) RETURN VARCHAR2 AS
> RCONTENT VARCHAR2(25);
> BEGIN
> SELECT CONTENT INTO RCONTENT
> FROM SECRET
> WHERE CODE=SYSCODE;
> RETURN RCONTENT;
> END;
>
> INSERT INTO SECRET VALUES ('ABC','HLLOWORLD');
> 1 row created.
>
> And: select Get_Content('ABC') from dual
> returns: HLLOWORLD
>
> Bob Proffitt
> Beckman/Coulter
> Brea California
> RTProffitt_at_beckman.com
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Wed May 05 1999 - 14:08:39 CEST

Original text of this message