Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Basic Proc Question

Basic Proc Question

From: Brian Forster <brian.forster_at_cnhiindiana.com>
Date: Thu, 1 Feb 2001 13:19:04 -0500
Message-ID: <3a79a729$0$1510$7ea90a65@news.netdirect.net>

Hi All,

I realize this is a very basic question, but I come from a SQL Server background and I am trying to grip the following difference between SQL Serv and Oracle.

Basically I want to create a procedure that is nothing more than a select statement that accepts a parameter.

Here is what I have:

create procedure Daily_Ads

    (rep_no IN varchar2)

        as
            Begin
                Select adno,unet from ad where vnoflag = 'Y' and receiver =
rep_no
                and prdate =
to_char(to_date(Sysdate,'MM/DD/YYYY'),'MM/DD/YYYY');
            End;

Then call it execute Daily_Ads('A23');

The procedure is marked invalid because I don't have an insert into. I don't want one, I just want to return records. Can I do this?

Please Help

TIA Brian Received on Thu Feb 01 2001 - 12:19:04 CST

Original text of this message

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