Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Writing PL/SQL in Java.

Re: Writing PL/SQL in Java.

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 31 May 2007 08:17:35 -0700
Message-ID: <1180624655.336341.278360@h2g2000hsg.googlegroups.com>


On May 31, 7:01 pm, "Mr. X." <no_spam_please_at_nospam_please.com> wrote:
> Thanks,
> I see some example on the internet.
> I didn't understand how can I publish java code,
> so I can use at the package something like :
>
> The example :
> -------------
> public class Formatter {
> public static String formatEmp (String empName, String jobTitle) {
> empName = empName.substring(0,1).toUpperCase() +
> empName.substring(1).toLowerCase();
> jobTitle = jobTitle.toLowerCase();
> if (jobTitle.equals("analyst"))
> return (new String(empName + " is an exempt analyst"));
> else
> return (new String(empName + " is a non-exempt " + jobTitle));
> }
>
> }
>
> The class Formatter has one method named formatEmp, which returns a
> formatted string containing a staffer's name and job status. First, you
> write the call spec for this method as follows:
>
> CREATE OR REPLACE FUNCTION format_emp (ename VARCHAR2, job VARCHAR2)
> RETURN VARCHAR2
> AS LANGUAGE JAVA
> NAME 'Formatter.formatEmp (java.lang.String, java.lang.String)
> return java.lang.String';
>
> ...Should I compile java somewhere on the server ?How can I do that ?Need
> sample or link, please.Thanks :)

http://tahiti.oracle.com is your best friend. It provides access to all Oracle documentation in searchable form. Read the Java Developer's Guide for your Oracle release there - it contains all necessary information and examples.

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Thu May 31 2007 - 10:17:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US