Wednesday 26 June 2013

Content Canvas to execute the details of given employee id

Content Canvas to execute the details of given employee id
   
declare a variable and assign the value for tat variable from the database table then set the assigned value to the output field name
tables:
empp(empno number,ename varchar2(20),comm number)
employe(e_id number,first_name varchar2(20),last_name varchar2(20),
   dob date,mobile_no number,salary number,dept_id number)


Query:
PROCEDURE EMP_QUERY IS
     e_id employe.e_id%type;
   fname employe.first_name%type;
   lname employe.last_name%type;
   d_date employe.dob%type;
   mobile employe.mobile_no%type;
   sal employe.salary%type;
   d_id employe.dept_id%type;
begin
   select first_name,last_name,dob,mobile_no,salary,dept_id into fname,lname,d_date,mobile,sal,d_id from employe
   where :employe.e_id=employe.e_id;
   :employe1.first_name:=fname;
   :employe1.last_name:=lname;
   :employe1.dob:=d_date;
   :employe1.mobile_no:=mobile;
   :employe1.salary:=sal;
   :employe1.dept_id:=d_id;
   
END;

No comments: