Skip to Main Content

Oracle Database Discussions

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PL/SQL: ORA-00984: column not allowed here

953957Aug 23 2012 — edited Aug 23 2012
Sorry, this is probably easy and something simple I overlooked but it is driving me nuts :-)
VARIABLE g_fk_deduction 	VARCHAR2(30)
VARIABLE g_fk_empno     	NUMBER
VARIABLE g_before_or_after_flag	CHAR(1)
VARIABLE g_deduction_amount	NUMBER

BEGIN
  :g_fk_deduction 		:= '401K';
  :g_fk_empno     		:= 7369;
  :g_before_or_after_flag	:= 'B';
  :g_deduction_amount		:= 150.00;
END;
/
BEGIN
  INSERT INTO emp_deductions 	(fk_deduction, fk_empno, before_or_after_flag, deduction_amount)
   VALUES			(g_fk_deduction, g_fk_empno, g_before_or_after_flag, g_deduction_amount);
  COMMIT;
END;
/
Getting error: PL/SQL: ORA-00984: column not allowed here on g_deduction_amount
in the value clause.
Any help would be appreciated.

Table is below:
CREATE TABLE emp_deductions     (
      fk_deduction  		VARCHAR2(30),
      fk_empno        		NUMBER(4),
      before_or_after_flag    	CHAR(1),
      deduction_amount       	NUMBER(6,2));
Edited by: LostNoob on Aug 23, 2012 7:06 PM
This post has been answered by Mark Williams-Oracle on Aug 23 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2012
Added on Aug 23 2012
7 comments
7,081 views