Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Procedure compilation errors

556526Mar 3 2007 — edited Mar 5 2007
I am trying to create a procedure GETEMPLOYEES that displays all employee names of EMPLOYEE table on the screen by concatenating all its columns. But, I am getting error.

Employee Table
EMPLOYEE_ID NUMBER(10)
FIRST_NAME VARCHAR2(40)
LAST_NAME VARCHAR2(40)


CREATE OR REPLACE PROCEDURE GETEMPLOYEES AS
ID EMPLOYEE.EMPLOYEE_ID%TYPE,
fNAME EMPLOYEE.FIRST_NAME%TYPE,
lNAME EMPLOYEE.LAST_NAME
AS
BEGIN
SELECT EMPLOYEE_ID INTO ID,
FIRST_NAME INTO fNAME,
LAST_NAME INTO lNAME
FROM EMPLOYEE;
DBMS_OUTPUT.PUT_LINE(ID||fNAME||lNAME);
END;
/

This is giving compilation error. Can you kindly help.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2007
Added on Mar 3 2007
11 comments
886 views