Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selection in procedure

Status
Not open for further replies.

emyzhu

Technical User
Feb 27, 2001
1
US
I tried to create a procedure as following:

CREATE OR REPLACE PROCEDURE testStudent (
p_FirstName students.first_name%TYPE,
p_LastName students.last_name%TYPE) as
BEGIN
select first_name, last_name
into fname, lname
from students
where ((first_name=p_FirstName) AND (last_name=p_LastName));
END testStudent;

But I always get the Warning: Procedure created with compilation errors.
Could anyone give me some help? Thanks a lot!
 
As a general rule, you should try to create the procedure from sql*plus, then issue the command SHOW ERRORS.
This will give you more information to go on.

However, in this case, your problem is that you haven't declared fname or lname.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top