Need an anonymous block for fake update,

I have a table called sk_a
create table sk_a (a number, b date, c varchar2(10));
and an audit table
create sk_a_audit (audit_id number, a number, b date, c varchar2(10),dml_action varchar2(4));
and sequence sk_a_audit_seq
create sequence sk_a_audit_seq
when any insert or update happens into sk_a table, respective data should insert into sk_a_audit table
and trigger is
CREATE OR REPLACE TRIGGER SK_A_TRG
AFTER INSERT OR UPDATE
ON SK_A
FOR EACH ROW
DECLARE
l_code NUMBER;
l_errm VARCHAR2 (64);
BEGIN
IF (INSERTING OR UPDATING)
THEN
INSERT INTO SK_A_audit
VALUES (sk_a_audit_seq.NEXTVAL, :NEW.a,
:NEW.B, :NEW.C ,'I');
END IF;
EXCEPTION
WHEN OTHERS
THEN
l_code := SQLCODE;
l_errm := SUBSTR (SQLERRM, 1, 64);
DBMS_OUTPUT.put_line ('DML Operation is failed ' || l_code || l_errm);
END;
sk_a may or maynot have primary or unique keys,
now my requirement is
audit table will be deleted by business users,,
and then I have to run an update on sk_a table (fake update) so that data will come and insert into audit table,,,,
so that audit table will be back with all the data of sk_a table again,
I need an anonymous block for this, can any one help on this,

audit table will be deleted by business users,,
and then I have to run an update on sk_a table (fake update) so that data will come and insert into audit table,,,,
so that audit table will be back with all the data of sk_a table again,
I need an anonymous block for this, can any one help on this,Y? audit table was deleted by busineess users..? could u pls explain it..?
if u know that users going to delete the audit table, then take the back of the table. that is better instead of fake update.
U can use exp utility for taking that back up
Pls reply
S

Similar Messages

  • HT200149 I need download wi-fi for software update

    hello I need to download install wifi on my iPhone os 5c for software update thank u fama

    WiFi is not something to download. Your iPhone has wifi capability. You need to find
    a wifi network to connect to. What country are you located in? Try bookstores,
    Internet cafes, Starbucks or similar coffee houses, friends, relatives, schools,
    etc.

  • Sales order need to be blocked for delivery while creation

    Hi experts,
                    My requirement is to block sales orders for delivery, for the selected distribution channels, and for selected countries while creation itself, so for this I came to known that a program MV45AFZZ include, here in this at which form can I write code to block SO for delivery. and is it enough to put a reason in the field LIFSK in VBAK table to block SO for delivery.
    Thanks in advance
    Regards
    SriNivas........

    Hi,
    You can use form routine USEREXIT_SAVE_DOCUMENT_PREAPRE of user exit MV45AFZZ to update the delivery block.
    MOVE '10' to vbak-lifsk.                    "13 is the reason for block in header"
    MOVE '10' to xvbak-lifsk.                  "13 is the reason for block in header"
    Use following code to update delivery block at item level
    MOVE '10' to vbep-lifsp.                      "13 is the reason for block in item schedule line"
    MOVE '10' to xvbep-lifsp.                    "13 is the reason for block in item schedule line"
    Regards
    Vinod

  • How come the item value does not come thru via PL/SQL anonymous block?

    Hi,
    It's a Form with 3 tables -
    1) ClinicianProfileTb (with about 40 columns, insert/update via DML),
    2) PeopleTb (with about 7 columns, insert/update via PL/SQL anonymous block) and
    3) ClinicianPracticeTb (with about 10 columns, insert/update via PL/SQL anonymous block) for after-submit-processes.
    So I have several After-Submit-Processes. For some reason, it appears that PeopleId which is supposed to come thru via the 2nd After-Submit-Process (ie: Insert/Update PeopleTb) does not do the way it's supposed to. And when I press "Create" button at the bottom, I got the following error msg:
    ORA-01400: cannot insert NULL into ("TEST_0712"."CLINICIANPRACTICETB"."PEOPLEID")
    I tried the "debug" mode (via edit page link), but to no avail. (I'm newbie, trying to learn and deliver at the same time :)).
    I uploaded the app to apex.oracle.com, if someone could kindly take a look and let me know what goes wrong, it'd be greatly appreciated.
    workspace: test_0712
    app: 43408 - TEST
    user: demo
    pswd: demoPswd
    Page#21 -> look at the After-Submit-Processes -> in "Insert/Update PeopleTb" it appears that PeopeId does not come thru; thus it cannot be updated to ClinicianProfileTb.PeopleId (allows null) -> and thus cannot be inserted into ClincianPracticeTb.PeopleId (which does NOT allow null). Basically my logic is that in order to create ANY row in ClinicianPracticeTb, BOTH PracticeId AND PeopleId must be present.
    Acutally I should have used the PeopeTb as DML (as the driving table) to enforce that PeopleId must be present in order to insert ClinicianProfileTb and ClinicianPracticeTb, but it'd be lots of codes to write to insert/update in ClinicianProfileTb (40 columns).
    In addition, does ApEx consider EVERY SINGLE after-submit-process are in ONE transaction for commit/rollback? It appears that it treats all PL/SQL anonymous blocks are in ONE transaction, while Automatic Row Processing (DML) is commited/rolled back on its own?
    Thanks much,
    Helen

    All blocks that do not commit in one of the ways I detailed (and which do not explicitly commit using a commit statement) are part of the transaction started with > the first DML statement issued in any of the page processes and continuing until a commit is issued.Say, there are the following processes in the After-Submit-Processes:
    1. Process1 -> Automatic Row Processing (DML)
    2. Process2 -> PL/SQL anonymous block
    3. Process3 -> PL/SQL anonymous block
    Based on what you describe, in the event that if there is no explicit "commit" issued in any of these processes, then an implicit "commit" will be issued at the end of Process3?
    Thanks, Scott.
    Doreen

  • Stock blocking for a customer

    Dear All,
    We have a scnario where some materials at depot needs to be blocked for a particular customer. As and when orders arrive from this customer, this material would be delivered to him. The system should NOT allow the supply of this material to any other customer. Please note that at the time of receiving the material at depot, there need not be any open orders from the customer so we can not book this stock against the sales order stock. Can it be done that the stock is booked against this customer and only the orders that are subsequently created against his name will be allowed to use this stock ?
    TIA

    there is no such feature in SAP, only workarounds.
    you can post the stock to blocked stock, however you have no way to enter a text to a stock that tells you that this is blocked for customer A.
    you can create a sales order with delivery date in far future to allocate the stock to this sales order. you can then change the order in quantity and delivery date if the order is really coming.
    you can move the stock to customer consignment stock.
    if you use batch managment, then you have some more options with batch determination and classification.

  • Building blocks for incentive and commission management

    Hi Gurus,
    I am in need of building blocks for   Incentive and commission management,  I appreciate if anyone can provide me this above... .
    thanks
    chandra

    hi
    see ICM never goes independently,so you wonnt have any help on ICM alone,it works in collabvoration with different transactional data,like opportun ity and channel management.
    try these links
    http://help.sap.com/saphelp_crm60/helpdata/en/8d/ed100ab6ff425a92458921a551efcd/frameset.htm
    http://help.sap.com/saphelp_crm60/helpdata/en/c6/b42d824113469aa04bf695e743c8f4/frameset.htm
    best regards
    ashish

  • I bought a MacBook Pro I can not sign up for the updates, because I do not have credit card. Only own debit card, but the system does not accept. What can I do?

    I bought a MacBook Pro I can not sign up for the updates, because I do not have credit card. Only own debit card, but the system does not accept. What can I do?

    You do not need to "sign up" for downloading updates. Just run Software Update and let it access them directly thru the App Store.

  • GL account needs to block for local currency & another cur. needs to post

    Hi,
    I need GL account that should block for posting in local currency, it should post other(forgien) currencies. how can i handle this scnerio.
    if there is any balance,is it possiable to maintain validation.could you please let me know,how i can resolve this problem.
    Thanks in advance
    Jaya

    Hi,
    Though a document is created in foreign currency, system will also update the amount in local currency based on the conversion rate given in the document or maintained in OB08 table.
    If your requirement is to allow only foreign currency transaction for a GL account, then write validation with the condition that - If GL account no is XXXXX, check document currency is not equal to local currency (BKPF-WAERS).
    Regards,
    Rengaraj

  • Need to disable "Block Anonymous Internet Requests" with "Clone MAC address?"

    Ok -- so I learned from tech support and this forum that the "Clone MAC address" option needs to be enabled when connecting to the Internet via a cable modem. In one of the forum posts (sorry lost track of which one), it said that in addition I need to disable "Block Anonymous Internet Requests" as well -- is this correct? If so what is the effect of this? Linksys documentation is not clear if this is absolutely necessary.
    I think the comment is in this thread
    http://forums.linksys.com/linksys/board/message?board.id=Wireless_Routers&message.id=8600

    Usually resetting you cable modem will allow you to use a router without cloning the MAC address.  Reset modem, power down, plug router into the modem, power up the modem, power up the router and you should be good to go.  The popular reason that I know of for unchecking "Block Anonymous Internet Requests" is when you plan to use P2P software like Azureus.  Your computer becomes pingable and can be seen on the net.

  • Multi Row update using pl/sql anonymous block process

    Does anyone have an example of multi row update using a pl/sql anonymous block process?
    The reason I can not use the apex mru process is that the table in questions has a five field key.
    My attempts have failed with a bad number.
    Thanks,
    Gary

    Hi Gary,
    can y<ou pls send the definition of thet table and the UPDATE sql.
    It is a littel difficult like this.
    We need more info.
    BR,
    Lutz
    =;-)

  • Can't restore apple id ,you were blocked for security reasons, but to restore the need to enter the key after typing it sends a 4-digit code on the ipad , but at ipade I am not connected to icloud ,and to connect you need to recover your account

    can't restore apple id , because apple were blocked for security reasons, but to restore the need to enter the key two- step werification . after typing it , apple sends a 4-digit code on the ipad , but at ipad I am not connected to icloud ,so i cant get code . but if i want to recover apple id, i need to  connect icloud, so what to do? help !

    I have (sorry forgot to add that). I was switched around and finally I was told I would be put through to a supervisor but after being on hold for about 10 minutes the phone went dead, I did not lose connection so I do not know if I was hung up on or there was some technical difficulty. I called again yesterday and did in fact speak with a supervisor for Account Security but he told me he did not know why it was happening and put me through to a different number but that ended up not being any helpful either. That's when I decided to give it a shot on here!

  • My iPad 2 shows I have 7 apps that need to be updated and when I go into my App Store it won't pull up anything for my updates how can I fix this????

    My iPad 2 shows I have 7 apps that need to be updated and when I go into my App Store it won't pull up anything for my updates how can I fix this????

    It seems Apple is having some issues at their end. There have been hundreds of posts on the forum with the same problem.

  • HT5654 When I connect my iPhone to my computer, it says that I need the latest download for my iTunes to be able to sync. I already have the iOS7 and the 11.1.3 update. Whats the deal?

    When I connect my iPhone to my computer, it says that I need the latest download for my iTunes to be able to sync. I already have the iOS7 and the 11.1.3 update. Whats the deal?

    I have the same thing with my ipad "Bill's Ipad cannot be used because it requires itunes version 11.1 or later"
    Thanks for help.

  • ...desperating trying to install itunes 10.7, but it asked me to install Mac OS X 10.6.8.  I did, but then it said that I needed to install Java for Mac OS x 10.6.  I did that and now it keeps saying 'this update requires Mac OS X version 10.6??

    ....desperating trying to install itunes 10.7, but it asked me to install Mac OS X 10.6.8.  I did, but then it said that I needed to install Java for Mac OS x 10.6.  I did that and now it keeps saying 'this update requires Mac OS X version 10.6??

    Upgrading to Snow Leopard
    You must purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s MobileMe service; fees and
               terms apply.
    Actually, you cannot download Snow Leopard. You downloaded a Snow Leopard updater.

  • HT4623 MyiPhone 3GS on setting general does not have the place for software update adn I need to update to iOS5.1

    My iphone 3GS does not have in General the place for software update and for some my apps it request that I do iOS5.1 but I cannot do it tell me how

    The OTA update capability was not introduced until iOS 5. You will need to connect the device to the computer and iTunes and update it as you did in the past.Once you have updated, you will have the ability to do OTA updates in the future.

Maybe you are looking for

  • How do I get my iPod nano to work in my car again?

    My iPod Nano was working perfectly fine in my car, then all of a sudden it looked as if it was paused. I tried to push play in the car but it would not allow me to listen to music. I"ve also tried changing the chord, the iPod and my car is not muted.

  • Regarding ACL

    Hi All, I'm an abaper & new to DMS concepts. .How to use authorizations in DMS & EDMS.Do i need to activate something to see the authorization tab in DMS. Where can i find these access control lists.I'm Studying this link (http://help.sap.com/saphelp

  • Condition tables for PO

    Hello Gurus, I am creating a report for Input tax and Output tax calculation and I have been searching for condition tables for PO. I have tried KONV, KONP but i dont get any entry for taxes like VAT, Additional VAT, CST, etc. in that table related t

  • Copying sub-categories, PSE 9 restore.

    If I use 'Restore' in PSE 9 to copy my photos to a new PC, will all my sub-categories also be copied over from the five back-up DVDS? In the instructions for 'Restore' under PSE 9 Help, it states that, "the last disc should be inserted on request', o

  • Getting a new MacBook Pro, Upgrade to Logic Studio 9?

    Hey all. I'm getting a new Macbook Pro soon, and I was thinking of upgrading to Logic Studio 9. I own a legit retail edition copy of the previous Logic Studio (Pro 8), and I was thinking of just installing 9 on my new computer. What things will I nee