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: Dumb Q but I need to Know

Re: Dumb Q but I need to Know

From: <mheindel_at_glatfelters.com>
Date: Thu, 23 Sep 1999 10:49:07 GMT
Message-ID: <7sd0j0$u35$1@nnrp1.deja.com>


you must select INTO something.
ie.

declare

     name_var char(30);
begin

     SELECT ename INTO name_var FROM employee WHERE empcode = 4567; end;
/

This will only work for a select that returns 1 record, if you need a set of records, you will have to use a cursor.

HTH Michael Heindel, AAM

In article <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

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Sep 23 1999 - 05:49:07 CDT

Original text of this message

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