Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Basic Proc Question
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