Re: Dumb Q but I need to Know
Date: 1999/09/22
Message-ID: <37E9A5B3.E2D561A7_at_ntsource.com>#1/1
Perhaps the problem is that you have missed the "into" part of the query.
As an example the following procedure compiles and executes and illustrates use of "into":
SQL> declare
2 v_row dual%rowtype;
3 begin
4 select * into v_row from dual; 5 dbms_output.put_line(v_row.dummy);6 end;
7 /
X
PL/SQL procedure successfully completed.
Alternatively, this could be written:
SQL> declare
2 cursor c is 3 select * from dual; 4 v_row c%rowtype; 5 begin 6 open c; 7 fetch c into v_row; 8 close c; 9 dbms_output.put_line(v_row.dummy);10 end;
11 /
X
PL/SQL procedure successfully completed.
Frank Hubeny
IIFThen wrote:
> I'm trying to write a simple select query within an Oracle stored procedure
> using the following syntax:
>
> select * from <tablename> where <condition statement>
>
> It's compiling with errors. How do I rectify this for Oracle SP. I guess
> I've been with MS SQL Server SP way of doing things. Can anyone out there
> help me out. Thank you.
> --
> IIFThen
Received on Wed Sep 22 1999 - 00:00:00 CEST