Solved

Trigger to insert to table which is in database link

Posted on 2008-06-23
4
1,511 Views
Last Modified: 2013-12-18
I create a database link for my database named T24 , whenever  DOC table in our ddatabase is inserted , my trigger shall insert into VPB_STMT_ENTRY  table in Databaselink . I write the trigger but complication is error .

Help me please!
CREATE OR REPLACE TRIGGER sms_t24
    AFTER INSERT
        ON doc
        FOR EACH ROW
    
DECLARE
        v_username varchar2(10);
 
BEGIN
       
insert into vpb_stmt_entry@t24 
(id,
 account,
 update_time
)
 
 values
(:new.auth_code,
 :new.target_number,
 :new.AMND_DATE
 );
 END;

Open in new window

0
Comment
Question by:dinhchung82
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Milleniumaire
ID: 21845206
The code looks okay, so I'm guessing the problem is related to permission.  

What is the compilation error?
0
 
LVL 5

Author Comment

by:dinhchung82
ID: 21845997
I use pl/sql tool to write and compile . The error is "Warning: Trigger created with compilation errors"
I am newbie in pl/sql , would you tell me the way to show the error ?
0
 
LVL 16

Accepted Solution

by:
Milleniumaire earned 50 total points
ID: 21846028
Do you mean you use sqlplus?

Try typing the following after attempting to create the trigger:

show errors;
0
 
LVL 5

Author Closing Comment

by:dinhchung82
ID: 31469692
Thanks so much , I am so tired for working all day so have mistake with typing .
The error is below when i use your command.
 "LINE/COL ERROR
-------- ------------------------------------------------
8/3      PL/SQL: ORA-00904: "ACCOUNT": invalid identifier
6/1      PL/SQL: SQL Statement ignored
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle encryption 12 72
capture vmstat info and insert it into an oracle table 31 93
oracle date format checking 7 52
oracle sql developer + get hour from datetime field 2 26
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question