|
Re: Data Insertion [message #88728 is a reply to message #88727] |
Thu, 20 February 2003 03:55 |
Ravi
Messages: 251 Registered: June 1998
|
Senior Member |
|
|
Hi Okondu,
Just now i did some small excerises based on your Query..
I created a report with EMP Table and for display purpose i selected only four feilds i.e. EMPNO,ENAME,
JOB,dEPTNO.
Now in report layout inside EMPNO feild i have written one format trigger...
-------------------------------------------
function INS_EMP_DATAFormatTrigger return boolean is
begin
DECLARE EMO_NO NUMBER;
emp_no number;
begin
emp_no := :empno;
insert into emp (EMPNO,ENAME,JOB,deptno)
values(emp_no + 1,'Ravi','SWEng',20);
commit;
END;
return (TRUE);
end;
-------------------------------------------
In this format trigger i am taking empno and while insertin into table i am incrementing that empno by 1...
After generating the report you can see the emp table data..
May be this will help you....
Regards
|
|
|