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: Can Oracle do this!?

Re: Can Oracle do this!?

From: Robert <robert_klaus_at_yahoo.com>
Date: 2000/08/08
Message-ID: <sp12f6mm63a57@corp.supernews.com>#1/1

Jonus,

I'm not sure if I understand the question completely, but look at the following:

CREATE OR REPLACE PROCEDURE SP_TEST
    (IN_ONE IN VARCHAR2

    , IN_OUT IN OUT VARCHAR2
    , OUT_ONE OUT VARCHAR2
    , OUT_TWO OUT VARCHAR2
    , OUT_THREE OUT VARCHAR2)

IS
BEGIN
SELECT COL_ONE , COL_TWO , COL_THREE ,COL_FOUR INTO OUT_ONE,OUT_TWO,OUT_THREE, IN_OUT FROM TABLEA WHERE COL_ONE = IN_ONE AND COL_TWO = IN_OUT; END; The parameters I have declared at the beginning of the procedure(IN_ONE, IN_OUT, etc. are parameters that can be incoming values or outgoing (return) values depending on how they are declared. The calling program would pass it's own variables and receive the values back.

Robert
robert_klaus_at_yahoo.com

Jonas wrote:
>
> Hi all.
> I'm trying to move my SQL code from IB to Oracle, but there are
> problems.
> In IB using a stored procedure, I can at any time return the values of
> the returns variables.
> For example:
> FOR SELECT a, b FROM myTable
> WHERE c = 'XXXX'
> INTO :RA, :RB
> DO BEGIN
> SUSPEND; <-- Fetch all returns variables (Now with the quey values)
> RA = 'AAA';
> RB = 'BBB';
> SUSPEND; <-- Fetch all returns variables (Now with my values)
> ....
> Can I do this in Oracle?
>
> Tanks in advance!
>
> jserrachinha_at_mail.telepac.pt
> jserrachinha_at_esoterica.pt

--
Posted via CNET Help.com
http://www.help.com/
Received on Tue Aug 08 2000 - 00:00:00 CDT

Original text of this message

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