<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: create trigger in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978599#M781585</link>
    <description>Hi Jonax,&lt;BR /&gt;&lt;BR /&gt;  :new.col_name refers to the new value being inserted into column "col_name" and :old.col_name refers to the existing value thats being overwritten or updated. &lt;BR /&gt;&lt;BR /&gt;Hope this clarifies.&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Sunil</description>
    <pubDate>Mon, 15 May 2006 03:23:40 GMT</pubDate>
    <dc:creator>Sunil Kumar MK</dc:creator>
    <dc:date>2006-05-15T03:23:40Z</dc:date>
    <item>
      <title>create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978594#M781580</link>
      <description>Does anyone knows how to create trigger in oracle8i that will papulate table2(temporary table) &lt;BR /&gt;when table1(live table) updates/changes rows done by the end user.&lt;BR /&gt;Can you give me specific example on how to create this trigger.&lt;BR /&gt;&lt;BR /&gt;thanks you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 02:54:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978594#M781580</guid>
      <dc:creator>jonax</dc:creator>
      <dc:date>2006-05-12T02:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978595#M781581</link>
      <description>Jonax,&lt;BR /&gt;create trigger ledger_audit&lt;BR /&gt;before update on table1&lt;BR /&gt;for each row&lt;BR /&gt;begin&lt;BR /&gt;insert into table2 values&lt;BR /&gt;( :new.data1, :old.data2);&lt;BR /&gt;end;</description>
      <pubDate>Fri, 12 May 2006 03:04:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978595#M781581</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-05-12T03:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978596#M781582</link>
      <description>Hi jonax,&lt;BR /&gt;&lt;BR /&gt;You can create a trigger that execute &lt;BR /&gt;implicitly when an INSERT, UPDATE, or DELETE statement is issued against &lt;BR /&gt;the associated table.&lt;BR /&gt;&lt;BR /&gt;A trigger can be fired upon the execution of a SQL statement or by an event.&lt;BR /&gt;&lt;BR /&gt;There are BEFORE triggers and AFTER triggers.&lt;BR /&gt; You require an AFTER trigger.&lt;BR /&gt;&lt;BR /&gt;With an AFTER ROW trigger. -- Trigger action is executed after modifying each row and possibly applying appropriate integrity constraints (rows are locked).&lt;BR /&gt;&lt;BR /&gt;Peter has given you the syntax above.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IA&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 03:38:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978596#M781582</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2006-05-12T03:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978597#M781583</link>
      <description>Hi peter,&lt;BR /&gt;&lt;BR /&gt;Below are my sample tables.&lt;BR /&gt;&lt;BR /&gt;Im not sure if table2 is correct. &lt;BR /&gt;&lt;BR /&gt;what do you mean by :new.data1, :old.data2 ??  is it a new/old columns in table2? &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;table1  &lt;BR /&gt;&lt;BR /&gt;CREATE TABLE TABLE1&lt;BR /&gt;(&lt;BR /&gt;  POLNUM  VARCHAR2(15 BYTE),&lt;BR /&gt;  COVNUM  NUMBER(4)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;table2 &lt;BR /&gt;&lt;BR /&gt;CREATE TABLE TABLE2&lt;BR /&gt;(&lt;BR /&gt;  NEW_POLNUM  VARCHAR2(15 BYTE),&lt;BR /&gt;  POLNUM  VARCHAR2(15 BYTE),&lt;BR /&gt;  NEW_COVNUM  NUMBER(4),&lt;BR /&gt;  COVNUM  NUMBER(4)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thank you,</description>
      <pubDate>Sun, 14 May 2006 21:12:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978597#M781583</guid>
      <dc:creator>jonax</dc:creator>
      <dc:date>2006-05-14T21:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978598#M781584</link>
      <description>Hope this will help,&lt;BR /&gt;this will do an insert on table2 after an insert on table1.&lt;BR /&gt;&lt;BR /&gt;Mind you the insert on table2 is very basic,&lt;BR /&gt;to give you an example. We just count a nextval&lt;BR /&gt;&lt;BR /&gt;CREATE OR REPLACE TRIGGER table12_insert AFTER INSERT ON table1 FOR EACH ROW&lt;BR /&gt;begin&lt;BR /&gt;   INSERT INTO table2( new_polnum, polnum, new_covnum, covnum ) VALUES ( new_polnum.NEXTVAL, 'table12_insert', :new.new_covnum);&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;</description>
      <pubDate>Mon, 15 May 2006 01:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978598#M781584</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-05-15T01:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978599#M781585</link>
      <description>Hi Jonax,&lt;BR /&gt;&lt;BR /&gt;  :new.col_name refers to the new value being inserted into column "col_name" and :old.col_name refers to the existing value thats being overwritten or updated. &lt;BR /&gt;&lt;BR /&gt;Hope this clarifies.&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Sunil</description>
      <pubDate>Mon, 15 May 2006 03:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978599#M781585</guid>
      <dc:creator>Sunil Kumar MK</dc:creator>
      <dc:date>2006-05-15T03:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: create trigger</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978600#M781586</link>
      <description>Thanks for helping me on resolving my errors.</description>
      <pubDate>Mon, 22 May 2006 22:35:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/create-trigger/m-p/4978600#M781586</guid>
      <dc:creator>jonax</dc:creator>
      <dc:date>2006-05-22T22:35:59Z</dc:date>
    </item>
  </channel>
</rss>

