I am writing an Oracle procedure using TOAD. I executed the procedure using execute statement. But I am not able to get the result. Instead of that am getting error only. Please help how to run the procedure in TOAD. I am new to toad and Oracle.
Procedure in oracle
create or replace procedure pro_dndtesting( phone number)is
begin
select FLD_PHONENUMBERS from smsdnd_tbl where FLD_PHONENUMBERS=phone;
end ;
/
Executing procedure as follows
exec procedure pro_dndtesting(9865015695)
error
ORA-06550: line 1, column 7:
PLS-00201: identifier 'PRO_DNDTESTING' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Just to clarify: there is no such thing as “Oracle Toad”. Oracle is a RDBMS, whereas TOAD is a client for Oracle databases.
Your procedure won’t compile as you have written it because you don’t give an INTO clause for the SELECT (since PL/SQL – as opposed to plain SQL – requires a “target” for the result of the SELECT); try this:
As for the error you’re getting:
Did you use the same schema (=user) for defining the procedure and calling it?
Did you try it from an anonymous PL/SQL block like