Re: Dumb Q but I need to Know

From: <mheindel_at_glatfelters.com>
Date: 1999/09/23
Message-ID: <7sd0j0$u35$1_at_nnrp1.deja.com>#1/1


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 - 00:00:00 CEST

Original text of this message