Create the trigger to insert data from one user to another user in same Databas

Dear Sir, I created a trigger as follows

CREATE OR REPLACE TRIGGER TRIGGER1
BEFORE INSERTING
ON table1
FOR EACH LINE
BEGIN
INSERT IN THE TEST. TABLE2
VALUES (: NEW.) COLUMN1,: NEW. COLUMN2,: NEW. COLUMN3,: NEW. COLUMN4);
END;
/

I want here to insert my user to user Test data. In this Situation when I Execute The above Trigger it shows error PL/SQL: ORA-00942: table or view does not exist

Help, please

What do you mean by run the trigger?
Do you compile?
Can be open as a TEST and do the following and try to compile your code of the trigger again.

grant insert on TEST.TABLE2 to youruser;

See you soon,.
Manik.

Tags: Database

Similar Questions

  • Insert data from one table to another

    I have two tables SALES_MASTER and SALESMAN_MASTER which is described below.

    SQL > desc SALES_MASTER;
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    NO VARCHAR2 (6)
    NAME VARCHAR2 (20)
    PIN NUMBER (8)
    CITY VARCHAR2 (20)
    VARCHAR2 (20) STATE



    SQL > desc SALESMAN_MASTER;
    Name Null? Type
    ----------------------------------------- -------- -----------------------
    SALESMANNO VARCHAR2 (6)
    SALESMANNAME VARCHAR2 (20)
    ADDRESS1 VARCHAR2 (30)
    ADDRESS2 VARCHAR2 (30)
    CITY VARCHAR2 (20)
    PIN NUMBER (8)
    VARCHAR2 (20) STATE
    SALAMT NUMBER (8.2)
    TGTTOGET NUMBER (6.2)
    YTDSALES NUMBER (6.2)
    REMARKS VARCHAR2 (60)

    I want to insert data from SALESMAN_MASTER (2nnd table) to SALES_MASTER(first table). I want to insert only two columns NO, NAME and PIN code. All of these columns are compatible. I tried this command. But it's not working. Help me.

    SQL > insert into SALES_MASTER
    2 (NO., NAME, PIN CODE)
    3 values
    4. Select SALESMANNO, SALESMANNAME, PIN code
    5 SALESMAN_MASTER;
    Select SALESMANNO, SALESMANNAME, PIN code
    *
    ERROR on line 4:
    ORA-00936: lack of expression
    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;
    

    Kind regards
    Christian Balz

  • Inserting data from one table to another table

    Hello

    I have the following SQL where I am updating a table by adding new data from another table, but without success.

    INSERT INTO
    () TOP_PROSPECTS
    COMMON_ID
    DATE_ADDED
    REVIEW_RANK
    EVAL_DATE
    PM_ASSIGN
    WHY_NOTES)
    SELECT
    t.COMMON_ID
    t.DATE_ADDED
    t.REVIEW_RANK
    t.EVAL_DATE
    t.PM_ASSIGN
    t.WHY_NOTES
    Of
    TEMP_IVAN_MARY t
    WHERE
    COMMON_ID <>t.COMMON_ID

    Any suggestions?

    Thank you.

    Published by: user13822709 on August 14, 2012 09:14

    Published by: user13822709 on August 14, 2012 09:15

    Is that what you're trying to do with the insert. I think there may be a sign {noformat}<{noformat}{noformat}>{noformat} missing in the where clause. This site eat those, so you need to use the equivalent! = post here.

    If I'm wrong about the missing trader, then it looks like you want to insert rows in temp_ivan_mary that are not already in top_prospects. If Yes, then you need something like:

    insert into top_prospects
       (common_id, date_added, review_rank, eval_date, pm_assign,
        why_notes)
    select t.common_id, t.date_added, t.review_rank, t.eval_date,
           t.pm_assign, t.why_notes
    from temp_ivan_mary t
    where t.common_id not in (select common_id from top_prospects
                              where common_id is not null)
    

    Function index and data available volumnes etc. then a mergr can be more effective. Something like:

    merge into top_prospects p
       using (select common_id, date_added, review_rank, eval_date,
                     pm_assign, why_notes
              from temp_ivan_mary) t
       on (p.common_id = t.common_id)
       when not matched then
          insert (common_id, date_added, review_rank, eval_date, pm_assign,
                  why_notes)
          values (t.common_id, t.date_added, t.review_rank, t.eval_date,
                  t.pm_assign, t.why_notes)
    from temp_ivan_mary t
    

    John

  • Need some ideas on the copy of the data from one schema to another.

    Dear all,

    I would like to know the best method and possible by copying data from one schema to another. (I won't use EXP / IMP).
    Example:


    I have a scheme of production on which I have hundreds of tables. I copy the data of the TEST environment after comparing data, I should copy the data incrementally.
    Maybe this copy of data may occur once a month, or on request.

    I want to have this done by a procedure.
    I was thinking about the logic below, using a procedure I will compare the tables and the structures between the two schemas.
    Then I willl use the primary key in both tables column and compare the data first. If the data if it does not exist then I only inserts these records in the target.
    The above said logic could be as similar as the synchronization of data or records, but the table does not all columns to track records archived / copied from the source.
    Suggest me so if you can give me the best logic or solution.

    Thanks in advance...

    Concerning
    Suresh

    GSKumar wrote:
    Dear all,

    I would like to know the best method and possible by copying data from one schema to another. (I won't use EXP / IMP).
    Example:
    I have a scheme of production on which I have hundreds of tables. I copy the data of the TEST environment after comparing data, I should copy the data incrementally.
    Maybe this copy of data may occur once a month, or on request.

    I want to have this done by a procedure.
    I was thinking about the logic below, using a procedure I will compare the tables and the structures between the two schemas.
    Then I willl use the primary key in both tables column and compare the data first. If the data if it does not exist then I only inserts these records in the target.
    The above said logic could be as similar as the synchronization of data or records, but the table does not all columns to track records archived / copied from the source.
    Suggest me so if you can give me the best logic or solution.

    I don't know why you don't want to opt for EXP/IMP.
    As an alternative, if you have a link DB between Production and Test pattern (which I seriously doubt), you can use the MERGER to a copy of data from Production to Test Delta.
    a. INTRODUCE IN test_schema.table_name SELECT sequence_columns, column_list FROM (SELECT column_list FROM prod_schema.table_name LESS SELECT column_list from test_schema.table_name)
    Column_list must not contain columns that contain sequence values because they may differ and result in an incorrect result; Therefore, this is taken into account in the outer query rather than Inline mode.
    b. MERGE STATEMENT
    c. FALL of test_schema.table_name. CREATE test_schema.table_name as SELECT column_list from prod_schema.table_name; -A way very neat to copy all the data, provided you do not keep any changes to test the tables in the schema.

    However, you mentioned to find existing records based on the primary key; IMO, primary key is normally a sequence (may be alphanumeric) and its value on env Production and Test may defer or even can have different attributes, therefore, I find it incorrect to match only the primary keys. I would say to match the key attributes.

    If you want to follow the last update/insert for a record, you can add a column that puts the time of last modification. In this way, you can track the changes of a column. Another alternative would be to use a check to the table.

    Let us know your thoughts or concerns, so that help can be provided.

    I suggest that you read and follow {message identifier: = 9360002}.
    If you will be useful if you can provide all the information required in advance to help us provide you with a quick resolution.

  • Copy data from one schema to another. Reopen the Question

    Hello

    I had asked this question earlier to copy data from tables of one schema to another in the same database using the database link. In my previous post have mentioned below.
    Re: copy data from one schema to another.
    Now I am faced with the question for the remote copy of database

    I have created a DB connection between my local system and the remote database. with the chain of connection as shown below
    CREATE THE DATABASE PUBLIC LINK "MERU_DEV_LOCAL_DEV".
    CONNECT TO MERUDEV IDENTIFIED BY MERUDEV WITH THE HELP OF "MERUPROD";
    In the above script
    LOCAL DEVELOPMENT scheme IS
    REMOTE schema is MERUDEV
    I try to copy remote database to my local database tables using the script below.
    network_link DEVELOPMENT impdp = schema MERU_DEV_LOCAL_DEV = MERUDEV remap_schema = MERUDEV:DEVELOPMENT TABLE_EXISTS_ACTION = REPLACE
    But the copy of the table does not occur. What could be the problem? Please suggest me or do I need to modify the script

    Thank you
    Sudhir

    You can:
    -monitor the BONE with ps - ef
    -monitor data pump: jobs are dba_datapump_jobs and dba_datapump_sessions
    -monitor with logops: v$ session_longops

  • Best way to move data from one page to another within the app

    Hi all as I started to write that and was way to complicated to explain in full without a novel.

    Brief description. I use the query string that begins in the parent (from href in JSON) window must then be moved in the iframe url when moving to other pages to avoid security as a page and iframe is conflicting http and https. and are not accessible... It seems that there must be a better way.

    So my question is what is the best way in a platform open to move data from one page to another?

    You do it this way, it's in the menu.json, but when you work within the iframe and if your loading pages in applications using vairable relative URLS cross they come through.
    Discovered only this framework using the browser and you can se the construction and scope of all URLS used.

    The apps are sandboxed you cannot access aything in the parent frame, this is a feature of derliberate if something you can not do.

    As I said, you have a few methods to your own data storage space.

  • copy data from one database to another

    Hello

    I want to copy data from one database to another.

    I have two patterns such as

    dev1/dev@ORCL
    DEV2/dev@DCEL


    I have same tables dev1 and dev2 (tables)
    but I have not given in dev2 (tables).
    now, I want to copy dev1 (tables) in dev2 (tables).

    You can also use the database link:

    select * from dev1.emp@orcl;
    

    What database are you connected to?
    You must create and use the links in the database for all other databases.

    For example if you are connected to the database A and to retrieve data from database B, you must create a connection of database in base B

    create database link B connect to  identified by  using 'B';
    

    Then you can retrieve data from database B with

    select * from [yourschema.]yourtable@B;
    

    This will work only for tables that are visible to the user that you used in the definition of database link.

    Published by: hm on 10.08.2011 22:15

  • transfer of data from one server to another server

    transfer of data from one server to another server... How is possible?

    We used to transfer data of one cube to another using... report script... then load rule... so can we use even for that?
    but

    I would like to know any other comments and other means (like to explore)

    If you move the range of data to load into the different cube, then you can use report script or calc extrcat data and can use the rule files to load the data.
    If you move the data to load into a cube replicated in another environment, you can take the lev0 data and can do the free form of loading.

  • Sending data from one component to another

    I want to send data from one component to another.

    Both are on the page of Main.mxml

    What is the best way to do it (without going into a frame)

    Who send data up to the main.msml via an event then complex treatment of vars public and pick up in the second pane, but is it possible to go straight?

    Thank you

    Dan

    Once the element keeps one reference to another. Or you set it to a global var shared by two components.

    C

  • transmission of data from one container to another

    Hello

    Let's say I have two containers (Container1 = application, Container2).  Container1 receives data from user, do some search database and displays Container2 with database search results.

    -Container1 (call and display)-> Container2

    Below shows how I use a bindable variable in container1 for transmitting data of container1 in Container2.  Also shows how to display Container2 of container1.

    <! - Container1 - >

    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML ">


    ....
    [Bindable] public var foo:String = 'bar ';
    ....
    private void loginHandler(event:LoginEvent):void
    {
    mycontainer2 = new Container2();
    mycontainer2. Name = "mycontainer2";
    this.addChild (mycontainer2);
    }
    < / mx:Application
    >

    I am data access in Container2 as follows:

    <! - Container2 - >

    {mx.core.Application.application.foo}

    T1) is there a better way to transfer data from one container to another and to access the data?

    Q2) is the only way to call and display of the container1 Container2?

    Q3) how can I return to container1 Container2, i.e. Container2 call and display container1

    Container2-(back to)-> container1

    Best practices call for the use of custom events to share data between components. Here is my message from Flex 3 cookbook on the theme:

    http://cookbooks.Adobe.com/index.cfm?event=ShowDetails&PostID=15466

    To easily switch between containers 1 & 2 use a ViewStack, the gold standard for this interaction and manipulate the selectedIndex and selectedChild property:

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=navigators_3.html

    If this post has answered your question or helped, please mark it as such.

  • How can I move the hair of a person from one photo to another and place it on another person?

    How can I move the hair of a person from one photo to another and place it on another person? I went through each instructional video you have and have not been able to master this. I tried the smart brush without result, and frankly, I don't think that your product is very intuitive. I work with the software as a professional and I would like to speak directly to someone who could guide me through this process, as I do for one of my clients of having problems with the software that I represent. Thanks, my email is [email removed by host address]

    First of all , we do not communicate with posters by private email.

    The purpose of the forum is for everyone to benefit from the questions and answers, not only the original poster.

    Secondly, you do not discuss Adobe here in the user forums.  You ask the help of users of volunteers like you who give their time for free. Nobody has any obligation to answer your questions.

    Thirdly, Adobe does not support tutoring hand-holding, step by step that you are looking for.  They have excellent video tutorials on Adobe TV.

    Photoshop is a professional application, making no apologies for his very long and steep learning curve

    Read this FAQ to get advice on how to ask your questions correctly to get faster and better answers:

    http://forums.Adobe.com/thread/419981?TSTART=0

    Finally, the titles of topic or subject should be clear, relevant and concise so that individual users can tell at a glance if they can help or not.

    This field is not for trying to adjust your entire question in there.

    Keep this in mind next time you post.  Thank you.

    Thank you!

    EDIT/ADDENDUM: on the other hand, if your ID Adobe is indicative of your true identity, like the beautiful Jay López, in real life, I and others here will be happy to oblige with one-on-one tutoring.

  • How one move the templates of virtual machine from one host to another host in the cluster even

    Hello

    Can you get it someone please let me know how to move the templates of virtual machine from one host to another host in the cluster even?

    Thank you

    James

    Welcome to the forums!

    Convert it to a virtual machine (right click on guest and choose the appropriateoption), move it through the migration feature (right-click Guest, and then choose "Migrate") and convert into a model (right click on guest again and choose to convert to a template).

    If you found this information useful, please consider awarding points to 'Correct' or 'Useful' responses Thank you!!

    AWo

    VCP / vEXPERT 2009

  • Create the trigger after insert

    Hello

    I would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2. But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)

    after insertion, I wanted to add another field in table2 as status


    create table table1)

    Name varchar2 (55),
    City varchar2 (55)

    );

    create (table2)

    Name varchar2 (55)
    status int (1)
    )

    Hope you could help me.

    Thank you

    Best regards

    antok1015 wrote:
    Hello

    I would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2.

    It's easy...

    SQL> create table table1(
      2    Name varchar2(55),
      3    City varchar2(55)
      4  );
    
    Table created.
    
    SQL>
    SQL> create table table2 (
      2    Name varchar2(55),
      3    status number(1)
      4  );
    
    Table created.
    
    SQL>
    SQL> create or replace trigger trg_tbl1 after insert on table1
      2  for each row
      3  begin
      4    insert into table2 values (:new.name, 1);
      5  end;
      6  /
    
    Trigger created.
    
    SQL> insert into table1 values ('Fred','Bob');
    
    1 row created.
    
    SQL> select * from table2;
    
    NAME                                                        STATUS
    ------------------------------------------------------- ----------
    Fred                                                             1
    
    SQL>
    

    But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)

    after insertion, I wanted to add another field in table2 as status

    This is not sensible. Please explain what you mean.

  • Windows 7 hangs during the transfer of data from one drive to another

    This problem was pestering me for a long time, well over a year.

    When I transfer data from one disk to the other (generally large amounts), the computer crashes and I get a blue screen or it just restarts.

    Initially, I thought it was a faulty hard drive, so I replaced that, but the problem persisted. I ran diagnostics of smart drive on all my drives and no problems have been picked up.

    Then I replaced my RAM assuming there that all. The problem continues.

    Then I replaced the video card. The same problem.

    I then upgraded to windows 10 and the problem became more acute, so I rolled back to windows 7.

    The SSD has the latest firmware, the latest graphics card drivers.

    I think now it is one of the following two issues:

    Either my SSD drive that contains the operating system or motherboard?

    Someone at - it ideas of how to diagnose precisely this problem or how to solve it? Would contribute to a new facility?

    PC: Windows 7 SP1, AMD Phenom II X 4 965, Kingston 16 GB 1866 MHz DDR3 Non - ECC CL9 DIMM (Kit of 4) XMP beast series - HX318C9T3K4/16, AMD Radeon (TM) R9 series 200, Asus M4A87TD/USB3 motherboard

    Pilot, verified and associated usbfilter.sys from Advanced Micro Devices Inc. USB filter driver.

    Remove the driver current completely and install the latest driver available.  For instructions on how to do read everything to update the drivers of my partner JMH3143 http://answers.microsoft.com/en-us/windows/wiki/windows_other-hardware/updating-a-driver/a5e6345e-af9b-4099-bef0-8d22254aa1c1?tm=1436753520149 here

    Also and important you need to update this driver since 2005.  It is a known problem in win 7 (ASACPI.sys)

    Pre 2009 this driver version is a known cause of BSOD.

    Please visit Asus tek computer Inc. - support - drivers and download p7p55d the
    http://support.ASUS.com/download.aspx?SLanguage=en&m=P7P55D%20Le&p=1&s=32&OS=29&hashedid=e7zic83pvqsr80lm

    Scroll to the utility category, then scroll down to the "atk0110 driver for Windows XP/vista/windows 7 32 & 64-bit" (it is about 12 down).
    Download and install it.

    Go to c:\windows\system32\drivers to check and make sure that the file asacpi.sys is stamped 2009 or 2010 (not before).  If you are using Win 8 there are at least a 2012 version that is needed for this.  If you can't find it on the site of ASUS you can download using windows update.  Read about it here
  • LKM to move data from one schema to another in the same DB

    Hello

    I am new to ODI. My question is simple:

    I created a mapping to move data from a table in Figure 1 to another table in Figure 2 (the two schemas in the same Oracle DB.

    What is the best LKM Oracle for performance to use in this case? Most of the LKMs using DB link... but is it really necessary that the two schemas are in the same DB?

    Ive used SQL knowledge SQL module, but I guess it's probably slower strategy.

    Thank you!

    Vitor Moreira

    Hello

    If two phyiscal patterns are on the same database, you want a Phyiscal server with two patterns of phyiscal under this server in your topology, this way ODI will recognize that you don't need a LKM (at all) and mapping will have to IKM / CKM only.

    If ODI is to ask a LKM, looks like the two schemas to belong to their own physical server in the topology browser? In this case, it is not optimal.

    Just make sure that your user has access to two objects in diagrams and you'll be fine.

    If you really want to go Oracle DB Oracle DB then DB link or Datapump for large volumes of data, JDBC/Agent (SQL for SQL) for smaller volumes.

Maybe you are looking for