Stored Procedure Question

From: Brent Moonen <brentm_at_flash.net>
Date: 1998/11/12
Message-ID: <72frdd$n0b$1_at_excalibur.flash.net>#1/1


[Quoted] [Quoted] I am new to Oracle (version 7.3.3) and I am having difficulty creating a [Quoted] [Quoted] stored procedure. I want to be able to pass a value into this procedure and [Quoted] [Quoted] have it run a simple select statement using the value passed in the where [Quoted] [Quoted] clause. I believe this is possible in SQL Server, so I figured it would be [Quoted] possible in Oracle. I have not been able to do this and the Oracle [Quoted] [Quoted] documentation only gives examples using action queries (I have had success [Quoted] using Inserts, Updates, & Deletes in Procedure). This is my statement:

CREATE PROCEDURE TEST (xyz IN number)
AS
  BEGIN
    SELECT * FROM SomeTable
    WHERE SomeField = xyz;
  END;
/

[Quoted] [Quoted] This results in a compiliation error. Is this sort of thing possible or not? I thought of trying to use function, but I believe that it will only [Quoted] [Quoted] return one value rather than all the fields in the table. I'll be calling [Quoted] this procedure from VB using ADO. Any help would be greatly appreciated. [Quoted] Thanks in advance.

Brent Moonen Received on Thu Nov 12 1998 - 00:00:00 CET

Original text of this message