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 -> Re: Basic Proc Question

Re: Basic Proc Question

From: Geoffrey Bray <gbray1_at_my-deja.com>
Date: Thu, 01 Feb 2001 19:41:41 GMT
Message-ID: <95ce5i$725$1@nnrp1.deja.com>

You don't need a insert into, but you do have to have an into clause as part of your select to tell it where to put the data (i.e. what variables).

HTH,
Geoffrey

In article <3a79a729$0$1510$7ea90a65_at_news.netdirect.net>,   "Brian Forster" <brian.forster_at_cnhiindiana.com> wrote:
> 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
>
>

Sent via Deja.com
http://www.deja.com/ Received on Thu Feb 01 2001 - 13:41:41 CST

Original text of this message

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