Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: stored procedures in oracle
Hi,
You've got a syntax issue..how to correct it depends on whether your select statement returns one row only (if so, use SELECT..INTO) syntax.
If it returns multiple rows you'll declare and use an explicit cursor.
Hope this helps,
Steve
In article <92i041$74d$1_at_nnrp1.deja.com>,
urpukka_at_my-deja.com wrote:
> Hi!
>
> I have tried to make a stored procedures with Oracle SQL*Plus.
>
> CREATE OR REPLACE PROCEDURE OPET AS
> BEGIN
> SELECT
KJ1.KJGP0SSI.SIGNATUR,KJ1.KJGP0PER.EFTERNAMN,KJ1.KJGP0PER.FORNAMN
> FROM KJ1.KJGP0PER, KJ1.KJGP0SSI
> WHERE KJ1.KJGP0PER.PERSONNR = KJ1.KJGP0SSI.PERSONNR;
> END;
> /
>
> This procedure was created with compilation errors:
> LINE/COL ERROR
> -------- -------------------------------------------------
> 3/1 PL/SQL: SQL Statement ignored
> 4/6 PLS-00201: identifier 'KJ1.KJGP0PER' must be declared
>
> What is the problem?
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
Received on Fri Dec 29 2000 - 07:09:30 CST