Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dumb Q but I need to Know
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;
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;
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 - 22:59:47 CDT
![]() |
![]() |