How can I force a database trigger to fire only if there is an update not when insert

Hi
Could you help me please. I have a data base trigger that need
to fire only when there is an update in some columns in a table
But the trigger is firing eventhough they only do an insert.
here is the begining of the trigger.
create or replace trigger alpha_HZ_LOCATIONS_AUR
after update of address1,address2,city,state
,postal_code,county,province,country,attribute20
on hz_locations
for each row
DECLARE
v_cust_account_id hz_cust_acct_sites_all.cust_account_id%type;
v_cust_acct_site_id hz_cust_acct_sites_all.cust_acct_site_id%
type;
v_org_id hz_cust_acct_sites_all.org_id%type;
-- cursor; all sites for this customer address
cursor sc is
select
s.site_use_id site_use_id
,s.attribute15 frk_addr_number
from
ra_site_uses_all s
where s.address_id = v_cust_acct_site_id
and s.site_use_code in ('BILL_TO','SHIP_TO');
rowcnt number;
v_system_code varchar2(15);
v_ora_cust_num varchar2(30);
v_frk_cust_num varchar2(15);
v_insert_update_flag varchar2(1);
BEGIN
v_insert_update_flag := 'U';
-- get cust_acct_site_id (address_id)
begin
select acct_site.cust_account_id,
acct_site.cust_acct_site_id, acct_site.org_id
into v_cust_account_id, v_cust_acct_site_id, v_org_id
from
hz_party_sites party_site
,hz_cust_acct_sites_all acct_site
where acct_site.party_site_id = party_site.party_site_id
and party_site.location_id = :new.location_id;
Thank you much
alpha

Thanks for the response. My trigger is firing when I update the
table trough a form. Also when the uses go into the oracle apps
and create a new customer they get an error saying
ora-01403 no data found
ora-06512 at'the trigger name' and gives line number
ora-04088 error during execution of trigger.
Note: and I looked trigger it's really ok.
If you can please help

Similar Messages

  • How can I speed up this VI? It only checks 6 channels, but updates only 20/sec

    I am measuring 6 channels of current in this VI. It will only update about 20 times per second.
    The VI is quite simple. It measures current on 6 channels, performs a running average using shift registers, and performs some math on the current to convert it to loads. It also writes all values to a file once per iteration. I ran a similar VI that only checked 4 channels and did not write to the file, but it is not much faster. I also tried to make sure all coercion dots were eliminated, but that did not help much either.
    Can anyone take a quick look and see if there is something obvious I am doing that is slowing it down? Or is this a reasonable update rate for this VI?
    The top-l
    evel VI is the one called "RunTestBed 24v loop loop.vi".
    Thanks!
    Mike
    Attachments:
    RunTestBed_24v_loop_loop.llb ‏349 KB

    You are using high lvel VI to do you I/O inside the loop.
    Take a look at the shipped example that demonstrates how to start a do a continuous acquisition.
    The example is title something like
    Continuous double buffered acquisition.
    The High VI's you are using are configuring the I/O and allocating buffers durring each iteration. THe eaxample I mentioned will do all of this one up front and then just re-use everything inside the loop.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can i force flush database in toplink?pls help me

    Just like hibernate's session.flush().

    The JPA support in TopLink 10.1.3.1 allows you to flush an entity manager as per the JPA spec.
    Prior to 10.1.3.1, you can call writeChanges() on a UnitOfWork. However this call can only be used once per unit of work and can not be used to write out changes in an incremental fashion.

  • 802.11n: How can I force a wireless adapter to primarily associate to a 5Ghz radio and not to the 2.4Ghz one?

    Hi experts,
    I am playing with a Cisco 1142 AP. I have same SSID configured on both dot0 and dot1 interfaces. I have a test laptop and it has a Linksys dual-band wireless adapter. However the card always try to associate on the 2.4GHz. It will only associate with the 5GHz radio when I shut down the dot 0 interface. The laptop is running Windows XP SP3 and I'm using the windows wireless Zero configuration to configure the wireless. The following is the AP's configuration:
    dot11 ssid Guest-Wireless
       authentication open
       guest-mode
    interface Dot11Radio0
    no ip address
    no ip route-cache
    ssid Guest-Wireless
    antenna gain 0
    channel 2412
    station-role root
    bridge-group 1
    bridge-group 1 subscriber-loop-control
    bridge-group 1 port-protected
    bridge-group 1 block-unknown-source
    no bridge-group 1 source-learning
    no bridge-group 1 unicast-flooding
    bridge-group 1 spanning-disabled
    interface Dot11Radio1
    no ip address
    no ip route-cache
    ssid Guest-Wireless
    antenna gain 0
    dfs band 3 block
    channel dfs
    station-role root
    bridge-group 1
    bridge-group 1 subscriber-loop-control
    bridge-group 1 port-protected
    bridge-group 1 block-unknown-source
    no bridge-group 1 source-learning
    no bridge-group 1 unicast-flooding
    bridge-group 1 spanning-disabled
    Is it something I can control through the AP or it's the laptop/wireless adapter's own behavior so I either need a new card or update it with a new firmware?
    Thanks!

    Leolaohoo,
    Thanks for quick reply! My laptop is just next to the AP. There is nothing but air between the laptop and the AP.
    I actually did speed tests on both 2.4 and 5 (with 2.4 disabled of course) and I got pretty much the same result: 46Mbps MAX. I don't know if it's the linksys n card is limiting the capacity of the AP. But for now I just want it to jump on 5GHz instead of 2.4GHz...
    Thanks,

  • How can I force all photos to be stored only in low-res on my MacBook

    From reading the description on the Preferences in photos it says
    "Optimize Mac Storage - Store full resolution photos and videos in iCloud. Originals will also be stored on this Mac if you have enough storage space"
    The last sentence here is a big issue for me. I don't know how my Mac tried to determine what 'enough' is but basically I need free space desperately and I need ALL photos to be stored in iCloud, and low-res versions only on my Mac. No ifs ... no buts. This works fine it seems on iOS devices but the amount of space saved on my Mac has been really poor.
    Is there any way to do this?

    Aperture makes it easy to move any Image's Originals from inside the Library to outside the Library, and from any directly-connected location outside the Library to another directly-connected location, and to move any Image's Original from outside the Library to inside the Library, at any time, singly or in batch.
    Select the Photos container near the top of the Library Inspector.  In the Browser, select all Images.  Use "File ▹ Relocate Original", and select a destination and a Finder folder scheme.  Moving 1.5 TB of files will take some time.  Let it run.

  • How can I set the submit button to email only certain pages of the pdf not the entire pdf?

    We have a pdf that is a hundred pages or so where each page is an individual product that the customer can select for purchase. At the end of the pdf is an order form. We want to be able to email just the few pages which are the form as a pdf. The default function of the submit button is to email back the entire pdf. As there any way to just select whcih pages would be submitted?

    The problem is for people not using an email client like Outlook. In the version of Reader my boss was using, you had to save the FDF file to your hard disk and then open your browser to go to your web based email and write an email and attach the file. In the newest version of Reader it will open a browser window and create a draft for you, but he thought it was to much work if people were using older versions of Reader. He was really looking for something straightforward where all they had to do is push a button and it was submitted.

  • HT201287 How can I tell if my text message was delivered? There is no "delivered" note at the bottom (of the green bubble).

    Text message delivery indicator?

    Hi... you should see the bar at the top move to the right and then disappear indicating it's gone.  If it's not delivered you'll get a red ! against the message.  If you hold the message bubble and shift the bubble to the left you'll then see a time stamp which is when the message was sent.  As to checking if the person received it, not sure.  Can only suggest the above to confirm it left you.
    S

  • How can i use Unix database in java?

    How can i use Unix database in Java?
    Message was edited by:
    JPro

    I have not a clue about FoxPro, but the db then is FoxPro and not Unix. The better question would be "How do I connect to FoxPro DB running on Unix with JDBC?".
    My answer to that would be, search the Internet for a JDBC driver.

  • How can i open the database by force?

    my database is crash because the machine power problem, when i restart again, oracle error say the control file is older than the system tablespace file,
    so i have to create the controlfile again, then , the database need recover , but my database is not archived, it can't take a media recoer , what should i do?
    how can i open the database even lost some data?

    Pallofa,
    Try open img file using some software.
    You need a software to mount the img file.
    http://techie-buzz.com/how-to/mount-iso-files-as-a-virtual-cd-dvd-drive.html
    If thinstead of using an img file, just use this command.
    repair-bde e: d: -rp xxxx-xxxxx-xxxxxx-xxxxx -f -lf c:\log.txt
    where d is the portable disk whereyou want the data and d drive should at least
    equal to e drive.
    Where xxxx-xxxx-xxxxx is the 48 digit recovery password.
    -lf will generate a log file and point to a certain location, here I have pointed to c drive.
    After repair-bde is completed, run chkdsk /f on D drive, then try to access your data.
    Manoj Sehgal

  • I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    You may have to try deleting all the music from your phone (by going to Settings>General>Usage>Music, swipping All Music and tapping Delete), then sync it all back on with iTunes in order to fix this.

  • How can I force-install iOs5/6 apps on my iPod Touch?

    Hi, I have an iPod touch version 4.3.5 (ML1). Model is MC540C.
    The App Store sometimes bars me from installing apps because the app has a minimum requirement of iOS 5 or 6. How can I force my iPod to install these apps anyway?

    No, it is more than the screen dimension.
    You have a 4G iPod, why not update?
    To update:
    iOS 4: Updating your device to iOS 5 or later
    You need iTunes 10.7 or later on the computer

  • How can I force iTunes Match to upload a "Duplicate" to the iCloud?

    I have one album where the first track was uploaded, and the other eleven tracks are all tagged as "Duplicates." These tracks were not uploaded to the iCloud. How can I force iTunes Match to upload these eleven tracks erroneously tagged as Duplicates?

    I'm adding my 2¢ because I just "discovered" iTunes Match yesterday and decided to subscribe thinking there was no downside (doh!).
    Well, firstly, there's the enormous downside of Apple's structure not being able to keep up with (what they should have known would be) enormous interest... my iTunes has been matching for >20-hours and has yet to reach half-way up my library. BTW: I thought I read the iTunes Match info fairly thoroughly prior to subscribing and did not see anything about it being for songs vrs full library.
    And secondly, and even more important to me, is that Apple's method of determining duplicate songs is not robust enough, especially for classical music and audio books (e.g., LoTR). I have >12000 "songs" in my library, and Match has determined a boatload are duplicates. They are not of course and even if Apple's duplicate-determining algorithm just looked at disc & track numbers it would "know" that. Anyway, there's a fairly good chance I will not have one complete album upload/match out of >500 albums. That's nae Scottish, in anybody's book.
    Gotta say, using Garage Band to individually alter >2000 "songs" on the off-chance that may assist Apple's duplicate algorithm to be correct is not gonna happen. If, after the matching/uploading is complete, I still have >even 100-not-duplicate-songs listed as duplicates, I'm getting my $29.95 subscription back.
    ... and C: does anybody know why Apple's Lion spell check doesn't work on Apple's discussion forums???

  • I build databases with appleworks over 10 years on my ibook, and continue to add to them. Now I have a macbook pro. How can I translate the databases to a compatible program?

    Over 10 years I have built several databases with Appleworks. Now I have a macbook pro. How can I translate these databases to a 10.6.8 program?

    Thanks Joe, but that won't work. I've finally found a site that answers the question: http://www.wilmut.webspace.virginmedia.com/notes/aw/page1.html
    I can only say that by Apple I have been royally screwed. I'll never buy another mac -- everything I do would simply disappear into cyberspace.

  • How can I use two database in Dataset in SSRS?

    Hi,
    I am using one query to generate my SSRS report. In that query I am using subquery. Now I am pulling data from multiple tales.
    DB used in sub query is different than the rest of the tables DB.(So total I am using 2 DB(Database))
    So I see that in SSRS, I can connect query(In DataSet Properties) to one DATA_SOURCE only, how can I use other database which is I used in sub-query?
    I have to move this SSRS into PROD and I can't hard code that sub-query's DB name in my query.
    Please give me suggestion. Thanks!!
    Vicky

    In SSRS 2008 R2 you can use the Lookup function (http://technet.microsoft.com/en-us/library/ee210531.aspx ) and LookupSet function (http://technet.microsoft.com/en-us/library/ee240819.aspx
    Depending on your security set up, you can reference a table in a second database on the same server using a three part name:  database.schema.table.  This is more likely to work for you if you wrap your SQL command in a stored procedure.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • How can i force my mac book pro to use an external display

    how can i force my mac book pro to use an external display
    my screen is black

    What sort of adapter are you using?
    Clinton

Maybe you are looking for