Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger to execute an insert

Status
Not open for further replies.

mmayo

Programmer
May 29, 2001
38
US
I have data that needs to be pulled from oracle, modified, and pushed into PervasiveSQL. I would like to fire a trigger in oracle when an employee clocks out. I need data from that and 2 other tables in oracle. I would like to insert that into a table in Access.

Being my first trigger, I'm looking for direction. Here is the general idea:

CREATE OR REPLACE TRIGGER CIM_TIMECLOCK_TRIGGER1
AFTER
UPDATE [Clockout]
ON CIMFADMIN.CIM_TIMECLOCK
FOR EACH ROW
BEGIN
Insert into MyAccess
values:)new.[field from oracle table1],
:new.[field from oracle table2],
:new.[field from oracle table3])
Select [field from oracle table1, [field from oracle table2], [field from oracle table3] From OracleTable1, OracleTable2, OracleTable3 Where ((OracleTable1.ID = OracleTable2.ID) and (OracleTable1.ID = OracleTable3.ID));
END;

Am I on the right track? How do I designate the location of the Access database and table?

 
You may use Transparent Gateways, but your syntax is a bit strange. You may also write inserting procedure on Java
 
If I understand your qn correctly,
You need data to come from Oracle to go into MS Access db.
You need to modify the data coming from Oracle table(s).

If the above is correctly stated, then my understanding is you can not do it from a db Trigger in Oracle. VB sounds like a good option as it can talk to both databases.

Thx,
Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top