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

Home -> Community -> Usenet -> c.d.o.server -> Re: SELECT FROM PACKAGE

Re: SELECT FROM PACKAGE

From: Richard Graham <rgraham_at_orindaFRUITBATsoft.com>
Date: Mon, 04 Aug 2003 10:17:02 +0100
Message-ID: <3F2E248E.6030308@orindaFRUITBATsoft.com>


Monty,

This idea is offbeat but might help you:

  1. Get you hands on the package source.
  2. Find a friend who owns linux
  3. put the package source into a file called (say) english_package.sql:
  4. Then issue the following command while logged in Unix:

cat english_package.sql | awk -F\' '{ print $2 }'

Amongst a lot of rubbish you'll get output like this:

Illegal error due to...
Invalid number in customer id...
PLease reenter details for customer id

Put the output into a file called foo.sed and change it so that each line looks like this:

1,$s/Illegal error due to.../something in french/g
1,$s/Invalid number in customer id.../something in french/g
1,$s/PLease reenter details for customer id/something in french/g

What you've done is created a script for a Unix command called 'sed'.

To use your script do this:

sed -f foo.sed < english_package.sql > french_package.sql

You'll still have to spend time and energy fixing things but it'd be a good first start.

Richard Graham, Orinda Software

> Hi, we are using a commercial piece of software that has all user
> error messages stored in an Oracle package. I am wanting to customize
> a bit of software and use the same messages (two packages, one in
> English and the other in Frence) but cannot find out how to retrieve
> the text from them. Here is an example:
>
> CREATE OR REPLACE PACKAGE errMessages IS
> err1 CONSTANT VARCHAR2(100) := 'Illegal error due to...';
> err2 VARCHAR2(100) := 'Invalid number in customer id...';
> err3 VARCHAR2(100) := 'PLease reenter details for customer id';
> END errMessages;
> /
>
> I want the select to return all the VARCHAR2 so I can see what they
> all are. But when I execute the below I get an error.
>
> SQL>
> SQL> SELECT errMessages.err1,errMessages.err2,errMessages.err3 FROM
> DUAL;
> SELECT errMessages.err1,errMessages.err2,errMessages.err3 FROM DUAL
> *
> ERROR at line 1:
> ORA-06553: PLS-221: 'ERR3' is not a procedure or is undefined
>
> SQL>
> SQL>
> SQL>
>
> I understand the error and what is wrong but still want to see the
> text in an SQL box. Can someone help please. Using Oracle 9 on a Win2K
> server.
> Thank you
> Monty

-- 
------------------------------------------------------------------------
Remove FRUITBAT for a valid Email address..

www.orindasoft.com - makes of OrindaBuild
which generates Java JDBC access code for calling PL/SQL Procedures.
Received on Mon Aug 04 2003 - 04:17:02 CDT

Original text of this message

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