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: Creating Stored Procedure in Oracle 7.3

Re: Creating Stored Procedure in Oracle 7.3

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 27 Sep 2004 19:39:05 -0700
Message-ID: <1096339222.272854@yasure>


Fabio wrote:

> In article <J42dnQ18UYcYvcXcRVn-hA_at_comcast.com>, mcstockX_at_Xenquery
> says...
>
>
> Mark, thanks for your reply.
>
>

>>other issues you need to address:
>>[_] if possible get version 9i or 10g of oracle, 7.3 is very obsolete. 

>
>
> You're right. I use the Oracle 10g at home for my education purposes,
> but I have Oracle 7.3 at work because some company uses this database
> for the EasyPhone system (telemarketing software).
>
>
>>[_] you don't need to use a SELECT statement to get the value of SYSDATE,
>>you can just assign it directly to a variable (see 'Assignments' in chapter
>>2 of the PL/SQL manual)

>
>
> I don't want to select the date using this query. It was just an
> example. All I want is to return more than one row from a table at once.
> Unfortunately, I can't use the functions because the EasyPhone
> application does not handle the functions - only the simple select
> statements and procedure calls. The query I'd like to put into the
> procedure is like this:
>
> SELECT
>
> A.ID_ADDRESS,
> A.STREET,
> A.ZIP,
> A.CITY,
> T.ADD_TYPE,
> T.ADD_TYPE_DESC
>
> FROM
>
> EASY.BS_ADDRESS A,
> EASY.BS_ADDRESS_TYPE AT,
> EASY.BS_ADDRESS_TYPE_DESC T
>
> WHERE
>
> A.ID_KLIENT = 13 AND
> A.ID_ADRES = AT.ID_ADRES AND
> AT.ADD_TYPE = T.ADD_TYPE;
>
> Putting this query into the Oracle stored procedure is not as simple as
> I thought before.
>
> ..:: fabio

set serveroutput on

DECLARE x dual.dummy%TYPE;

BEGIN
   SELECT dummy
   INTO x
   FROM dual;

   dbms_output.put_line(x);
END;
/

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Sep 27 2004 - 21:39:05 CDT

Original text of this message

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