How to assign values to Concenated Variable [message #86619] |
Thu, 14 October 2004 02:44 |
M Kumar
Messages: 38 Registered: August 2004
|
Member |
|
|
I had written a procedure given below in a form.
How to assign value to the variable D1,D2,D3....
Pl. check the For Loop.
PROCEDURE SPROC IS
D1 varchar2(3);
D2 varchar2(2);
D3 varchar2(2);
D4 varchar2(2);
D5 varchar2(2);
D6 varchar2(2);
schk varchar2(2);
ccd varchar2(2);
ecd varchar2(10);
lday number;
bday number;
prvmth date;
cursor c1 is
select compcd,empcd
from spc
where schdate=trunc(:pdate-1,'MONTH');
BEGIN
loop
fetch c1 into ccd,ecd ;
bday:=0;
exit when c1%notfound;
schk:=dayval(i,prvmth,'1354');
for i in 1..6 loop
'D'||j := schk; /*D1,D2,D3,D4,D5,D6*/
end loop;
end loop;
close c1;
END;
Pl. can anyone help me.
Thanks
|
|
|