PL SQL Procedure problem
Posted on 2011-04-24
I have a table Mechanic with Mechanic_id, Mechanic_name and speciality_id
I also have a table Speciality with speciality_id and speciality_name.
I am trying to create a PL SQL procedure where I can enter in a mechanic's name and the mechanic's speciality is returned.
This is what I have so far........
CREATE OR REPLACE PROCEDURE mechProc (name IN NVARCHAR2)
Select speciality_id from mechanic where mechanic_name = name;
Insert speciality_id INTO id;
Select speciality_name from speciality where speciality = id;
Insert speciality INTO special;
DBMS_OUTPUT.PUT_LINE(Mechanic ' || name || ' specialises in ' || special );
Here's my error......
ERROR at line 9: PL/SQL: SQL Statement ignored7. Insert speciality_id INTO id;
8. Select speciality_name from speciality where speciality_id = id;
9. Insert speciality_name INTO special;
10. DBMS_OUTPUT.PUT_LINE('Mechanic ' || name || ' specialises in ' || special);
11. END mechProc;