Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> substitution variable

substitution variable

From: vertigo <ax178_at_wp.pl>
Date: Sun, 26 Dec 2004 08:45:07 +0100
Message-ID: <cqlq7h$fid$1@atlantis.news.tpi.pl>


Hello

I found code which should increase by 10% employee's salary (for those who earn less than 1000). Does this code work ? It's said that it' using substitution variables. I looked in documentation but there was said that i can create such variable by define, or accept...

Declare
V_sal emp.sal%TYPE;
Begin

	Select Sal
	Into V_sal
	From emp
	where empno = and P_empno		//?
	if (V_sal<1000) then
		update emp
		set sal:=sal*1.1
		where empno= and P_empno;	//?
	endif;

end;

How this code works ? (How does it loop for all emplyees ?) (or maybe here is error, so how should it be corrected ?)

Thanx
Michal Received on Sun Dec 26 2004 - 01:45:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US