Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: 8i java sample function would not compile ?
A copy of this was sent to tedchyn_at_yahoo.com
(if that email address didn't require changing)
On Wed, 29 Dec 1999 14:51:19 GMT, you wrote:
>Sir, following helloword java function from 8i documentation would not
>compile in sqlplus:
>
>1>create or replace function HELLOWORLD return varchar2 as
>2>language java name 'Hello.world() return java.lang.string';
/
put a SLASH after line 2 to tell SQLPlus that the function you are creating/replacing is at the end. since functions can contain ";" -- sqlplus cannot auto run your command when it finds a semi colon (else it would prematurely submit the sql statements to the database in most cases)...
>3>myString varchar2;
that is not a valid sqlplus command -- you probable mean:
variable myString varchar2(N)
where N is some integer size...
>4>call HELLOWORLD() into :myString;
>5>print myString;
>
>
>LINE/COL ERROR
>-------- --------------------------------------------
>3/1 PLS-00103: Encountered the symbol "MYSTRING"
>any clues
>thanx
>Ted Chyn
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Dec 29 1999 - 09:13:24 CST
![]() |
![]() |