Trigger with a problem - insert only situation where not exists

Hello experts!

I have a problem with a trigger, that I am creating. It compiles, but I get an error message when the trigger is activated.

The scenario is as follows:

I have a TBL_PUNKTDATEN table. Whenever the State of a record in this table is passed to 3 or 4 I need the trigger to insert a dataset object in my target (TBL_ARBEIT_ZU_GEBIET) table.
However, the trigger must insert data only when there is no existing record in the target table. The condition that specifies whether or not, there is a group of data is the LNG_GEBIET field, which exist in the source as well as in the target table. Therefore, for every LNG_GEBIET there may be only one set of data in the table target!

I created a trigger using the following code. However, it does not work.

Maybe you'll see what I want to achieve at a glance to my code.

Can you please help me on this one?

Thank you very much!

Sebastian
create or replace
TRIGGER set_status_arbeit_zu_gebiet AFTER
  UPDATE ON TBL_PUNKTDATEN FOR EACH ROW WHEN(new.INT_STATUS=3 or new.INT_STATUS=4)

declare
    cursor c is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
    x number;
begin
    open c;
    fetch c into x;
    if c%NOTFOUND  then  
    INSERT INTO TBL_ARBEIT_ZU_GEBIET
        ( 
        LNG_GEBIET,
          LNG_ARBEITSSCHRITT,
          PNUM,
          INT_BEARBEITER,
          DATE_DATUM, 
          GEPL_DATUM
        )
        VALUES
        (:new.LNG_GEBIET,
         52,
         1114,
         895,
         sysdate,
         to_date('01.01.1990', 'DD.MM.YYYY')
        ); 
    end if;
end;
Well, on the first insert the code works correctly and inserts the recordset as expected. However, if there is an existing recordset object where: new. LNG_GEBIET corresponds to LNG_Gebiet in my target table, I get the error ORA-06502!

Maybe spcifies it a little?

I hope you can help me!

Thank you!

Edited by: skahlert the 23.09.2009 10:26

Edited by: skahlert the 23.09.2009 10:28

Hi Sebastian,.

Looks like LNG_GEBIET is not a data type of NUMBER?

Trying to change that

declare
    cnumber number;
    cursor c2 is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
begin
open c2;
fetch c2 into cnumber;

in

declare
    cursor c2 is select LNG_GEBIET from TBL_ARBEIT_ZU_GEBIET where PNUM = 1114 and LNG_GEBIET=:new.LNG_GEBIET;
    v_c2  c2%ROWTYPE;
begin
open c2;
fetch c2 into v_c2;

This way you don't care datatypes or number of fields in the cursor c2.

Concerning
Peter

Tags: Database

Similar Questions

  • Problem with deployment on Simulator ("program file does not exist")

    Hello

    I currently have a problem with a project, I can't deploy it more in the Simulator: I always get an error "the file does not exist.

    The project itself can be compiled without any isse. I can also deploy the application on my phone without problem. But when I'm trying to deploy on the virtual machine, it says:

    Program file does not exist
    /Users/..../HFR10/arm/o.le-v7-g/HFR10 not found
    /Users/..../HFR10/arm/o.le-v7-g/HFR10 not found
    /Users/..../HFR10/arm/o.le-v7-g/HFR10 not found
    

    # the application is called, HFR10...

    What is strange, is that it looks at the folder "arm", which does not exist when I compile for the virtual machine since the architecture should be "x 86"... ".

    In the x 86 folder, I can find the compiled application...

    I tried to update the descriptor of bar:

        
           armle-v7
           HFR10
        
        
           Qnx/Cascades
           armle-v7
           HFR10.so
        
        
           armle-v7
           HFR10
        
        
           x86
           HFR10
        
    

    And modified the Simulator-Debug field that used to point to the folder 'arm '...

    but after a cleaning + reconstruction, I line have the same error, and he always looks inside the arm folder...

    No idea of what the problem is? This problem appeared when I moved from momentic 2.0 to the 2.1 beta...

    But I guess that he changed something in the configuration file, because even if I go back to momentic 2.0, I still have it exactly the same problem...

    Thank you!

    UM... In the dialog box "edit configuration", I spend 'use the workspace settings' to "Enable auto build" and it works to restarted...

    It's strange, the application was already built and available in the x 86 folder...

    In any case... Perhaps it would be useful for someone else...

  • insert this line does not exist

    Hi all

    I need to insert a line using the daily procedure. Insert must only be performed when this line does not exist in the table. Please suggest me a decision. I know it's simple question, sorry for disturbing (Burns my brain).

    Hello

    Use MERGE.
    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_9016.htm#sthref9082
    If you use Oracle 10 (or higher) then you don't need a section "WHEN MATCHED.

    If you want to know, post a small example of data (CREATE TABLE and INSERT statements, showing all the tables involved, as they exist prior to the INSERTs in question). Put one or two unconditional instructions INSERT (including an example of each matching rows found and not found) and the results you want (that is, the content of the table changed after the INSERTs).
    Always tell what version of Oracle you are using.

  • What this means: WHERE NOT EXISTS

    Hello!

    Pourraient some please explain me what the following statement? It's the 'where' - article I'm not sure how works.

    BTW, the statement gives a cost explain plan 674 000 due to sweep of table on the 512 MB and 6 645 059 lines xxs_entries of the table.

    Is it possible to rewrite this query?

    DELETE FROM xxs_entries
    WHERE DOES NOT EXIST)
    SELECT *.
    OF ledger_entries
    WHERE xxs_entries.entry_id =
    ledger_entries.entry_id);

    Thanks in advance for you help!
  • You want to capture update dates, with trigger on a view to refresh quickly materialized. But trigger on MV consider inserting and updates are inserts only.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    PL/SQL Release 11.2.0.4.0 - Production

    CORE Production 11.2.0.4.0

    AMT for Linux: Version 11.2.0.4.0 - Production

    NLSRTL Version 11.2.0.4.0 - Production

    I create the structure of the table like that.

    create table test1 (a primary key, b (2) char number, date c, d varchar2 (10), date of e);

    create table test2 (number of ab, cd (2) tank, date of the ef, gh varchar2 (10), date of the ij, kl varchar2 (100));

    Create materialized view log on test1;

    create materialized view fast refresh test1_v on commit in select * from test1;

    I have create a trigger of the sample

    CREATE OR REPLACE TRIGGER test1_trig

    AFTER INSERT OR UPDATE OR DELETE

    ON test1_v

    FOR EACH LINE

    DECLARE

    lr_test2 test2% ROWTYPE;

    lv_error VARCHAR2 (4000);

    BEGIN

    lr_test2. AB: =: NEW.a;

    lr_test2. CD: =: NEW.b;

    lr_test2. GH: =: NEW.d;

    IF THE INSERTION

    THEN

    lr_test2. EF: = SYSDATE;

    lr_test2.IJ: = SYSDATE;

    lr_test2.KL: = 'INSERT ';

    INSERT INTO test2

    VALUES lr_test2;

    ELSIF UPDATE

    THEN

    lr_test2.IJ: = SYSDATE;

    lr_test2.KL: = 'UPDATE ';

    UPDATE test2 = lr_test2 ab WHERE = LINE: OLD.a;

    ELSIF REMOVAL

    THEN

    DELETE FROM test2

    AB = WHERE: old.a;

    END IF;

    EXCEPTION

    WHILE OTHERS

    THEN

    lv_error: = SQLERRM;

    INSERT INTO XXDOMINO_FG_DATA_LOAD_ERROR

    VALUES ('test1_trig',

    : OLD.a,.

    "test1_trig,"

    LV_ERROR,

    SYSDATE);

    COMMIT;

    END test1_trig;

    /

    So, if check you my code,.

    When I insert EF = SYSDATE, IJ = SYSDATE.

    Update EF is not changed, IJ = SYSDATE.

    So I like to capture their insertion and update dates.

    But if updates or insert arrives on the materialized table. The trigger themselves as an INSERT only.

    So how do you capture the updates?

    I use the statemnet with out merger with performance and also able to capture the update dates.

    CREATE OR REPLACE TRIGGER test1_trig_merge

    AFTER INSERT OR UPDATE OR DELETE

    ON test1_v

    FOR EACH LINE

    DECLARE

    lr_test2 test2% ROWTYPE;

    lv_error VARCHAR2 (4000);

    BEGIN

    IF THE REMOVAL

    THEN

    DELETE FROM test2

        AB = WHERE: old.a;

    ELSIF INSERTION

    THEN

    MERGE INTO test2 one

    B using (SELECT 1 FROM DUAL)

    WE (ab =: new.a)

    WHEN MATCHED

    THEN

    UPDATE the VALUE ab =: NEW.a.

    CD =: NEW.b,

    GH =: NEW.c

    IJ = SYSDATE,

    KL = "Update"

    AB WHERE =: old.a

    WHEN NOT MATCHED

    THEN

    INSERTING VALUES (: NEW.a,)

    : NEW.b,.

    : NEW.c.

    : NEW.d,.

    : NEW.e,.

    "INSERT");

    END IF;

    EXCEPTION

    WHILE OTHERS

    THEN

    lv_error: = SQLERRM;

    INSERT INTO XXDOMINO_FG_DATA_LOAD_ERROR

    VALUES ('test1_trig',

    : OLD.a,.

    "test1_trig,"

    LV_ERROR,

    SYSDATE);

    END test1_trig_merge;

    /

    DISPLAY ERRORS;

  • Help with this sql. Only select employees in a separate Org?

    Hi guys, simple query.
    create table balancetest(emp_id number, balance_id number, balance number, org number);
    
    insert into balancetest values (111, 1, 1, 0);
    insert into balancetest values (111, 1, 1, 0);
    insert into balancetest values (111, 2, 1, 1);
    insert into balancetest values (222, 1, 2, 1);
    insert into balancetest values (333, 3, 4, 3);
    insert into balancetest values (333, 3, 4, 2);
    
    commit;
    
    SQL> select * from balancetest;
    
        EMP_ID BALANCE_ID    BALANCE        ORG
    ---------- ---------- ---------- ----------
           111          1          1          0
           111          1          1          0
           111          2          1          1
           222          1          2          1
           333          3          4          3
           333          3          4          2
    
    6 rows selected.
    As you can see, emp_id 111 appears on different Org (0 and 1). I need to calculate the balance, but the requirement says that I need to get employees appearing only in 1 body. It won't matter what org is selected (business rules provide balance will be the same), as long as if an employee is in the multiple org, this employee is selected only once for an org. So my result will be something like:
        EMP_ID BALANCE_ID    BALANCE        ORG
    ---------- ---------- ---------- ----------
           111          1          1          0
           111          1          1          0
           222          1          2          1
           333          3          4          3
           333          3          4          2
    or,
        EMP_ID BALANCE_ID    BALANCE        ORG
    ---------- ---------- ---------- ----------
           111          2          1          1
           222          1          2          1
           333          3          4          3
           333          3          4          2
    In other words, an employee should appear only in 1 org my result.

    any ideas? I tried:
    select * from balancetest bal1
    where not exists ( select bal2.emp_id from
                               balancetest bal2
                               where bal2.emp_id = bal1.emp_id
                               and bal2.org <> bal1.org
                               );
    But I guess that's not as simple as that!

    Hello

    You can find the smallest number org for each employee like this:

    SELECT    emp_id
    ,         MIN (org)  AS min_org
    FROM      balancetest
    GROUP BY  emp_id;
    

    You can get the desired results by selecting only the lines in balancetest that corresponds to a line in that the result above. There are several ways to do so, as a join:

    WITH  g  AS
    (
        SELECT    emp_id
        ,         MIN (org)  AS min_org
        FROM      balancetest
        GROUP BY  emp_id
    )
    SELECT  b.*
    FROM    balancetest  b
    JOIN                 g  ON  b.emp_id = g.emp_id
                            AND b.org    = g.min_org;
    
  • PLS-00201: identifier 'i' must be declared when using BULK COLLECT with FORALL to insert data in 2 tables?

    iHi.

    Declare
       cursor c_1
       is
        select col1,col2,col3,col4
        from table1
    
    
       type t_type is table of c_1%rowtype index by binary_integer;
       v_data t_type;
    BEGIN
       OPEN c_1;
       LOOP
          FETCH c_1 BULK COLLECT INTO v_data LIMIT 200;
          EXIT WHEN v_data.COUNT = 0;
          FORALL i IN v_data.FIRST .. v_data.LAST
             INSERT INTO xxc_table
               (col1,
                col3,
                col4
               )
                SELECT v_data (i).col1,
                       v_data (i).col3,
                       v_data (i).col4
                  FROM DUAL
                 WHERE NOT EXISTS
                              (SELECT 1
                                 FROM xxc_table a
                                WHERE col1=col1
                                      .....
                              );
                         --commit;
             INSERT INTO xxc_table1
               (col1,
               col2,
              col3,
              col4
               )
                SELECT v_data (i).col1,
                       v_data (i).col2,
                       v_data (i).col3,
                       'Y'
                  FROM DUAL
                 WHERE NOT EXISTS
                              (SELECT 1
                                 FROM xxc_table1 a
                                WHERE col1=col1
          .....
         );
    
    
           --exit when c_1%notfound;
       END LOOP;
       CLOSE c_1;
       commit;
    END;
    
    
    
    
    
    
    
    

    I get 40/28-PLS-00201: identifier 'I' must be declared what the problem in the above code please help me and I have lakhs of data

    Thank you

    Post edited by: Rajesh123 I changed IDX

    Post edited by: Rajesh123 changed t_type c_1 in Fetch

    But by using a SET of INSERT to insert into two tables at once in the same query would do the job without any collection of bulk of PL and avoid to query two times too.

    for example, as a single INSERT...

    SQL > create table table1 as
    2. Select 1 as col1, col2 of 1, 1 as col3, 1 as col4 Union double all the
    3 select 2,2,2,2 of all the double union
    4 Select 3,3,3,3 Union double all the
    5 Select 4,4,4,4 of all the double union
    6 select 5,5,5,5 of all the double union
    7 select 6,6,6,6 of all the double union
    8 select 7,7,7,7 of all the double union
    9 select 8,8,8,8 of all the double union
    10. Select 9,9,9,9 to the Union double all the
    11. Select double 10,10,10,10
    12.

    Table created.

    SQL > create table xxc_table like
    2. Select 1 as col1, col3 2, 3 as col4 Union double all the
    3. Select the 3, 4, 5 Union double all the
    4. Select the 5, 6, 7 double
    5.

    Table created.

    SQL > create table xxc_table1 like
    2. Select 3 as col1, col2, col3, 5 4 "n" as col4 Union double all the
    3. Select the 6, 7, 8, double "n"
    4.

    Table created.

    SQL > insert all
    2 when the xt_insert is null then
    3 in xxc_table (col1, col3, col4)
    4 values (col1, col3, col4)
    5 when the xt1_insert is null then
    6 in xxc_table1 (col1, col2, col3, col4)
    7 values (col1, col2, col3, 'Y')
    8. Select t1.col1 t1.col2, t1.col3, t1.col4
    9, xt.col1 as xt_insert
    10, xt1.col1 as xt1_insert
    11 from table1 t1
    12 left join external xxc_table xt (t1.col1 = xt.col1)
    13 left xt1 xxc_table1 outer join (t1.col1 = xt1.col1)
    14.

    15 rows created.

    SQL > select * from xxc_table by 1.
    COL1 COL3 COL4
    ---------- ---------- ----------
    1          2          3
    2          2          2
    3          4          5
    4          4          4
    5          6          7
    6          6          6
    7          7          7
    8          8          8
    9          9          9
    10-10-10

    10 selected lines.

    SQL > select * from xxc_table1 by 1.

    COL1 COL2 COL3 C
    ---------- ---------- ---------- -
    1          1          1 Y
    2          2          2 Y
    3          4          5 N
    4          4          4 Y
    5          5          5 Y
    6          7          8 N
    7          7          7 Y
    8          8          8 Y
    9          9          9 Y
    10-10-10

    10 selected lines.

    SQL >

  • Select with Where not in (subselect)

    Hello
    Are there any special about 'no' in the ORacle sql (10g) that it returns me all the lines, unlike SQL Server with the same code:
    select count(*) from t1_ups where  id_ups not in (select b.id_ups from t1_dups b)
    COUNT(*)               
    ---------------------- 
    0 
    
    vs.
    select count(*) from t1_ups where  id_ups not in ('abc', 'def','xyz')  --select b.id_ups from t1_dups b)
    COUNT(*)               
    ---------------------- 
    16 
    
    DDL:
        "id_ups"            VARCHAR2(20 BYTE),   is the same for both tables.
    I see that to remove < not > it works fine. is there any GOLD-> happaned plate AND with the negation?
    My overall task is to make the UNION "with replacement" when if any records exist in id_dups they will replace those of id_ups, so I try to make it into several parts.

    Thank you

    TR

    Published by: trento on Nov 16, 2010 15:00

    Use NOT EXISTS instead of NOT IN.

    select count(*) from t1_ups u where
    not exists (select b.id_ups from t1_dups b where b.id_ups= u.id_ups)
    
  • To only convert NOT EXISTS query JOIN plain

    Version: 10.2.0.5

    Developers have complained that the following query works very poorly and hooked most of the time.

    select distinct cust_id from cust_track_dtl TD
         where not exists 
         (select 1 from cust_master CM where TD.cust_id = CM.cust_id 
         and CM.rgn_code = TD.rgn_code
         CM.rgn_code = 'AP'
          )
    and TD.stat_code = 'C'
    and TD.proc_flag = 'Y'
    TD.rgn_code = 'AP'  ; ----------------> Is this logically correct ?
    CUST_TRACK_DTL table in the outer query has 2 million records
    
    CUST_MASTER table in their inner query(sub query) has 30 million records
    Currently, we are only at the design phase. I'm a bit confused about the
    rgn_code = 'AP'
    appearing in internal and external queries.

    I think that the motion seeks to recover all customers who are not the "AP" region, but the outer query WHERE clause has
    TD.rgn_code = 'AP'
    Is there something wrong with this logic?

    If it is logically correct, how can I convert this request with simple JOIN (ie. How can I get rid of NO thing EXISTS)?

    Your original. Rgn_code = "AP" is not necessary in the subquery but will change the results of the outer query.

    select distinct cust_id from cust_track_dtl TD
      left outer join cust_master CM
        on (TD.cust_id = CM.cust_iid AND
            CM.rgn_code = TD.rgn_code)
     WHERE TD.stat_code = 'C'
       and TD.proc_flag = 'Y'
       and TD.rgn_code = 'AP'
       and CM.cust_id IS NULL;
    

    or the other

    select pb.pub_name from publishers pb
      LEFT OUTER JOIN titles tt ON
        ON (tt.pubslisher_id = pb.publisher_id and
            tt.subject = 'RELIGION')
     where tt.pubslisher_id IS NULL;
    
  • "Problem reports and Solutions" does not

    After scoring in my Windows Vista machine, I am bombarded with notifications "Problem reports and solution" does not. I tried to disable the service, but I still get notifications. I can't find PRS in the control panel. In the event viewer, I found the following:

    Error
    Log name: Application
    Source: Application error
    Event ID: 1000

    WerCon.exe application, version 6.0.6002.18005, time stamp 0x49e026db, module wercplsupport.dll, version 6.0.6000.16386, time stamp 0x4549d345, exception code 0xc000001d, offset error 0x000000000000ce84, 0xda0, failing application start 0x01cd140e4c7b7770 process id failed.

    I can't confirm or deny that usrename of the local administrator account has been changed. It is quite possible. I know that usernames on the pc have been changed to instead of creating new user accounts. I just can't confirm if one of these accounts was a local administrator.

    Any help would be greatly appreciated. It is a major pain in the back.

    SG

    Hello

    1. Your computer is connected to a domain?

    2. don't you make changes to the computer until the problem occurred?

    I suggest you to see link below and check if it helps.

    Windows Error Reporting and reports on problems and Solutions feature in Windows Vista: http://technet.microsoft.com/en-us/library/cc709644(v=ws.10).aspx

    Hope this information is useful.

  • Return newly inserted identity if no record exists. Otherwise returns an integer. How, please?

    Hello! Below you will find a typical function we use in our data base. I thought that I can improve it using WHERE NOT EXISTS and BACK IN, but I can't understand how to return a default value

    value such as-1 if the record already exists. I'm trying to optimize and make the inserts in a single statement.

    Thanks in advance

    CREATE OR REPLACE FUNCTION "Some"."FUNC_TEST_NEW"
    ( v_Par1 Table1.Col1%Type,
      v_Par2 Table1.Col2%Type,
      v_Par3 Table1.Col3%Type,
      v_Par4 Table1.Col4%Type,)
    RETURN NUMBER AS
      inserted_id NUMBER;
      rec_cnt NUMBER;
    BEGIN
      --!!! DEFAULT !!!
      inserted_id:= -1;
    
      --CHECK FOR EXISTENCE
      SELECT COUNT(*) INTO rec_cnt FROM Table1 WHERE LOWER(Col1) = LOWER(v_Par1);
    
      --INSERT
      IF rec_cnt = 0 THEN
          --select sequence value
          SELECT MySequence.nextVal INTO inserted_id FROM dual;
    
          -- insert
          INSERT INTO Table1 ( Col1,Col2,Col3,Col4,Col5,Col6 )
            VALUES( inserted_id, v_Par1,v_Par2, v_Par3,  v_Par4, SYSTIMESTAMP);
          COMMIT;
    
          -- return sequence value of the newly inserted record.
          RETURN inserted_id;
      ELSE
        -- already exists, return DEFAULT
        RETURN inserted_id;
      END IF;
    EXCEPTION
    WHEN OTHERS THEN
    ---
    END;
    
    
    

    Create a unique index on lower (col1)

    Rewrite your code as below:

    CREATE OR REPLACE FUNCTION "some." "" FUNC_TEST_NEW ".

    (v_Par1, Table1.Col1%Type,

    v_Par2 Table1.Col2%Type,

    v_Par3 Table1.Col3%Type,

    v_Par4 Table1.Col4%Type)

    RETURN AS NUMBER

    inserted_id NUMBER;

    BEGIN

    Start

    -insert

    INSERT INTO Table1 (Col1, Col2, Col3, Col4, Col5 Col6)

    VALUES (MySequence.nextVal, v_Par1, v_Par2, v_Par3, v_Par4, SYSTIMESTAMP)

    return col1 in inserted_id;

    COMMIT;

    When DUP_VAL_ON_INDEX then

    inserted_id: = - 1;

    end;

    Return inserted_id;

    END;

  • That IS NULL is done by replacing the NOT EXISTS operator with an outer join?

    DB version: 10 gr 2

    An example of searchoracle.target.com

    The query that contains a NOT EXISTS operator
    SELECT M.ModulId, M.Modul FROM MODULE M
    WHERE NOT EXISTS
    ( SELECT PROJEKTMODUL.IdModul 
      FROM PROJEKTMODUL 
      WHERE M.ModulId = PROJEKTMODUL.IdModul 
      AND PROJEKTMODUL.IdProjekt = 23 )
    is replaced by an equivalent outer join query
    select distinct
           M.ModulId
         , M.Modul 
      from MODULE M
    left outer
      join PROJEKTMODUL
        on M.ModulId = PROJEKTMODUL.IdModul
       and PROJEKTMODUL.IdProjekt = 23
     where PROJEKTMODUL.IdProjekt is null
    I do not understand what
    PROJEKTMODUL.IdProjekt is null
    fact in the above rewritten query.

    He is to perform an anti-jointure. As far as I know Oracle (starting with version 10g - I thought that release 1) rewritten a Join Anti that resembles your second query of your request NOT EXISTS and NOT IN.

    Look at the results of the query without the predicate IS NULL and see what records (from this set) must be selected to show the same results as the first query. Areas of interest match the predicate IS NULL.

  • Office jet while a 6600 PRINTER with scanner problems. but I can't scan where I have a modifiable document because only let's scan me documents I can not edit

    original title * Bubbles44

    I have an office jet while a 6600 PRINTER with scanner problems. I am trying to scan to my hp Pavilion 23 all in a computer with windows 8, but I can't scan where I have a modifiable document because only let's scan me documents I can not edit! HELP ME PLEASE!

    Hello Sharon,

    Thanks for posting your query on the Microsoft Community.

    I would be grateful if you could answer the following questions:

    How the computers are connected? If they are connected as a workgroup or domain?

    Method 1: Disable the security software and check if the printer works.

    Warning: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 2: You can turn off the Windows Firewall and see if you can print.

    1. Press the Windows key +X key.
    2. Select Control Panel.
    3. Click on the firewallof Windows .
    4. Select enable the Windows Firewall On or off on the right next to the sign.
    5. Select the radio buttons Turn off firewall under Private and Public network settings

    Warning: after reviewing the issue, turn on the firewall.

    Method 3: Refer to the suggestions for the following links.

    How to troubleshoot printing problems in Windows:

    http://Windows.Microsoft.com/en-us/Windows-8/How-to-solve-printing-problems

    Solve printer problems:

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-8&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    Hope this information helps and let us know the State of the question, we will be happy to help you.

    Thank you.

  • WHEN I OPEN INTERNET EXPLORER THE E-mail INSERT attachment only WILL NOT WORK - BUT OPEN WHEN IT WITH ADD - no one seems to help me with this problem?

    WHEN I OPEN INTERNET EXPLORE THE INSERT ATTACHMENT WILL WORK - BUT WHEN HE OPENS WITH ADD - NO ONE SEEMS TO HELP ME WITH THE PROBLEM OF TIS!

    That means '' BUT WHEN OPEN IT WITH ADD? '' With no Add-ons? Have you tried allowing add-ons one at a time until you find out that one is the cause of the problem?

    "NO ONE SEEMS TO HELP ME WITH THE PROBLEM OF TIS!

    Have you thought to ask in the forum Internet Explorer?

    Internet Explorer forums
    http://answers.Microsoft.com/en-us/IE

  • Email not sent by INSERT trigger with utl_mail

    Hello
    I have a trigger that is sending an e-mail whenever a particular column (ATTRIBUTE11) is inserted with the value or updated.
    E-mail should be sent when the table (ATTRIBUTES) is inserted with a value of ATTRIBUTE11 (IE, ATTRIBUTE11 is not null)
    An email must not be sent on the update of the same value in this column (former. ATTRIBUTE11 = new. ATTRIBUTE11) and also an email must not be sent if the table is inserted without value in ATTRIBUTE11

    ATTRIBUTES of table has a structure:
    Account varchar2 (20);
    Attribute11 varchar2 (20);
    user_name varchar2 (20);

    Triggering factor:
    CREATE OR REPLACE TRIGGER "TPP_SND_EMAIL".
    AFTER INSERTION OR UPDATE OF ATTRIBUTE11
    ON GENEVA_ADMIN ATTRIBUTES.
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE
    WHEN)
    OLD. ATTRIBUTE11 <>NEW. ATTRIBUTE11
    )
    DECLARE
    MSGBODY varchar2 (50);
    BEGIN
    () UTL_MAIL. Send
    sender = > "hemanth11"yahoo.co.in"
    recipients = > "[email protected]"
    subject = > "Test mail through utl_mail.send."
    message = > msgbody,.
    mime_type = > ' text/plain '.
    );
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' error: ' |) SQLERRM);
    END TPP_SND_EMAIL;
    /

    * One Email is not sent whenever a new row is inserted in this table whose value ATTRIBUTE11 (this happens). *
    The trigger is activated an email successfully each time an update happens on the column.

    Do we not have an option to manage the when clause differently for INSERT and UPDATE differently or is theer a way to manage the same in the trigger above.

    Please help me in this regard.

    Published by: user13321434 on July 7, 2010 06:19

    user13321434 wrote:

    I need to send an email, even if the transaction rolls back, makes my job easier it

    It is always wrong.

    What happens if this code UTL_MAIL ends up with slow network response or an SMTP server overloaded? What happens if the SMTP server is down and the mail cannot be sent? What happens to the transaction then?

    Your code is involved not only with the execution of the transaction, but also the integrity of the transaction. It is absolutely not a single justification for this approach to coding a ULT_MAIL delivery within a trigger. Is bad.

    The right approach creates a notification or an event to create and deliver an e-mail message. Where the process that will make this event or act on this notification
    (a) may have retry mechanisms for mail failures
    (b) has no impact in any way shape or form on the transaction that created the event or notification

    Violate this fundamental principle to your own (and the base of data and transaction) risk.

Maybe you are looking for