Recreate Table Error?

Code generated using synchronise seem to ommit the schema prefix when re-interting the records from the backup table:
Anyone know if there is an option I need to cick somewhere, or whether this is a bug?
ALTER TABLE UNIGSE.SERVICE_REQUEST RENAME TO bcp_SERVICE_REQUEST
CREATE TABLE UNIGSE.SERVICE_REQUEST
SERVICE_ID NUMBER (9) NOT NULL ,
CONTRACTN VARCHAR2 (10 BYTE) NOT NULL ,
POLICYN VARCHAR2 (10 BYTE) ,
TYPE VARCHAR2 (5 BYTE) NOT NULL ,
APPLIED_DATE DATE NOT NULL ,
SYSTEM_DATE DATE NOT NULL ,
USER_ID VARCHAR2 (15 BYTE) NOT NULL ,
STATUS VARCHAR2 (1 BYTE) NOT NULL ,
BPM_STATUS NUMBER (2) ,
CORRELATION_ID VARCHAR2 (50 BYTE) ,
MACHINE_DATE DATE DEFAULT SYSDATE NOT NULL
ORGANIZATION HEAP
PCTFREE 0
PCTUSED 0
INITRANS 2
TABLESPACE UNIGSE
LOGGING
STORAGE (
PCTINCREASE 0
MINEXTENTS 1
MAXEXTENTS UNLIMITED
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
NOCOMPRESS
NOCACHE
NOPARALLEL
NOROWDEPENDENCIES
DISABLE ROW MOVEMENT
INSERT INTO UNIGSE.SERVICE_REQUEST
(SERVICE_ID , CONTRACTN , POLICYN , TYPE , APPLIED_DATE , SYSTEM_DATE , USER_ID , STATUS , CORRELATION_ID , MACHINE_DATE )
SELECT ALL
SERVICE_ID , CONTRACTN , POLICYN , TYPE , APPLIED_DATE , RECEIVED_DATE , USER_ID , STATUS , CORRELATION_ID , MACHINE_DATE
FROM
bcp_SERVICE_REQUEST
;

I guess there is an alternative approach that you could consider to get round the problem, by unloading the Table data to a file rather than renaming the Table.
In the Compare Models dialog:
First select the Options tab and then select its "DDL Options" tab, and change the top right field "Regular DDL" to "Advanced CL DDL" (or "Advanced Interactive DDL").
Then select the "Tables that will be recreated" tab. This should contain an entry for each Table that will be recreated.
Under the "Backup Strategy" heading, change "Rename" to "Unload". (Note that the "Unload" option is not available unless you have selected Advanced DDL mode.)
DDL Preview will then generate commands to unload the Table data to a file and reload it from that file (as an External Table).
Advanced DDL mode allows you to step through the commands, by specifying start and stop step numbers, as described in the Help:
DDL type: Type of DDL statements to be generated: Regular DDL, Advanced Interactive DDL, or Advanced CL DDL
Advanced Interactive DDL and Advanced CL (command-line) DDL create a script with support for interactive (SQL*Plus or SQL Developer) or command-line (SQL*Plus only) setting of the following input parameters: start step, stop step, log file, and log level (1,2, or 3). Format for SQL*Plus execution of a resulting Advanced CL DDL script:
SQL> sqlplus user/password@name @script_name start_step stop_step log_file log_levelDavid

Similar Messages

  • Asset acquisition-Table error

    While doing an Asset posting from MM Side, the following error is happening:
    "No accounts have been entered for depreciation area 01 account allocation 31000 (Chart of accounts 1000)". 
    "Table Error"
    I have assigned accounts in AO90 for the acquisition/depreciation accounts.  Still I dont not understand why this error is happening ?  Please give some helpful inputs.

    Hi,
    in the IMG Fixed Asset Accounting you have several check and consistency reports. Run them, maybe you get some hints what could be missing in your configuration.
    Regards,
    Markus

  • Another User Modified Table Error.

    Dear All,
            My Client is using SAP B1 2007 B PL 11, When he is updating the Freight Amount in the Freight Window at that time he is getting the Error of Another User Modified Table Error.
           Plz guide me solving this issues.
      Regards
    Hitesh Parsawala

    Hi Hitesh ,
    This problem occurs when 2 users access the same form simultaneously .
    So just restart the SAP , It will work ..
    Hope it Helps
    Thanks
    -- Ashish Ranjan

  • SRKIM: Synchronize Wf Local Tables Errors: Ora-01400

    PURPOSE
    Synchronize Wf Local Tables 수행 시 발생한 ora-01400 error 를 해결한다.
    Problem Description
    Synchronize Wf Local Tables 수행 시 아래와 같은 error 가 발생하였다.
    ERROR
    FNDWFLSC module: Synchronize WF LOCAL tables
    Current system time is 31-AUG-2005 09:39:54
    **Starts**31-AUG-2005 09:39:54
    **Ends**31-AUG-2005 09:40:33
    ORA-12801: error signaled in parallel query server P000
    ORA-01400: cannot insert NULL into
    ("APPLSYS"."WF_LOCAL_ROLES_STAGE"."DISPLAY_NAME")
    STEPS
    The issue can be reproduced at will with the following steps:
    Submit the concurrent program Synchronize WF LOCAL tables.
    Log file shows error.
    Workaround
    N/A
    Solution Description
    해당 error 는 per_all_people_f table 의 global_name 이 null 이기 때문에 발생하는 error 로 가장 간단하게는 아래와 같이 처리 하면 된다.
    update per_all_people_f
    set global_name = full_name
    where global_name is null;
    commit;
    위의 작업 후 다시 Synchronize WF LOCAL tables process 를 수행 한다.
    해당 issue 에 대한 원인은 note. 397219.1 - Why Are There NULL Values For global_name In 를 참조 하도록 한다.
    Reference Documents
    Note 375508.1 - Synchronize Wf Local Tables Errors: Ora-01400: Cannot

    Hi Hussein,
    Thanks for reply. Please find the below details.
    RELEASE_NAME
    12.1.3
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Linux **** 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    Conc Req Log file
    Application Object Library: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    FNDWFLSC module: Synchronize WF LOCAL tables
    Current system time is 19-JUN-2012 05:49:20
    **Starts**19-JUN-2012 05:49:20
    **Ends**19-JUN-2012 05:49:20
    ORA-14501: object is not partitioned
    Start of log messages from FND_FILE
    End of log messages from FND_FILE
    Executing request completion options...
    Output file size:
    0
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 19-JUN-2012 05:49:20
    ---------------------------------------------------------------------------

  • Mutation table error

    i am trying to updata any row at the time i am getting mutating table error for some triggers
    fired on that table.what is the resonn and how to solve this problem,plz..help

    Here's a good resource
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:290416059674

  • Solve mutating table error

    Hi,
    I want a solution for mutating table error. I am a newbie in oracle.
    I'll explain my scenario.
    There are two tables TEACHER and STUDENT
    both are linked using the field 'tid'. the foreign key relation is given as ON DELETE CASCADE
    so if i delete a row from teacher , the corresponding rows in student get deleted, but i want to back up all the students who comes under that teacher, who is getting deleted.
    I tried in TRIGGER, but getting mutating table error.
    Please help
    Thanks in advance
    Divya

    This extract from an earlier post might be of help:
    You can solve this problem by using following thing
    1)create a view on same table with all fields
    and write trigger on table (insert,update or delete ) while inserting or updating or deleting row from table read from view.
    (Mutating error come when you are reading from one table and want to update,insert or delete row of same table).
    2)create a temporary table(but it is possible in 8i onword only) same as table on which you want to write trigger,while updating,inserting or deleting rows of table read from temporary table and after your work is over temporary table auotomatically drop (see proper command in oracle documentation to create temporary table).
    null

  • Mutating table error

    Hi All,
    I am getting the “ORA-04091 - mutating table error" when my trigger on a table "fnd_flex_values" fires. As I understand it, this error is occuring because, the users are trying to add rows to this table (it is an after insert trigger) and the trigger is trying to get values from the same table.
    Any suggestions on how to get around the mutating table error?
    My trigger code :
    CREATE OR REPLACE TRIGGER "APPS".ST_BU_PARENT_CC
    after insert on APPLSYS.FND_FLEX_VALUES REFERENCING OLD AS OLD NEW AS NEW
    for each row
    Declare
    v_flex_value    varchar2(150) :=null;
    v_desc          varchar2(2) := null;
    v_createdby     number      :=null;
    v_lstupdby      number      :=null;
    v_lstupdlogin   number      :=null;
    begin
      if inserting then
         select a.last_update_login,a.last_updated_by,a.created_by,a.flex_value,
                   rtrim(substr(description,instr(b.description,',')+1,5))
         into v_lstupdlogin,v_lstupdby,v_createdby,v_flex_value,v_desc
         from fnd_flex_values a,
                 fnd_flex_values_tl b
            where a.flex_value_id = b.flex_value_id
            and   a.flex_value_set_id = :new.flex_value_set_id
         and   a.flex_value_set_id = 1009635
            and   (a.flex_value like '1%' or a.flex_value like '7%')
         order by flex_value asc;
         insert into applsys.fnd_flex_value_hierarchies
            values(:new.flex_value_set_id,v_desc||'STO',v_flex_value,v_flex_value,sysdate,v_lstupdby,sysdate,v_createdby,null,null,null);
            insert into applsys.fnd_flex_value_norm_hierarchy
            values(:new.flex_value_set_id,v_desc||'STO','P',v_flex_value,v_flex_value,sysdate,v_lstupdby,sysdate,v_createdby,v_lstupdlogin,null,null);
      end if;
      exception
        when no_data_found then
          raise;
    end;Thanks,
    Chiru

    >>
    Any suggestions on how to get around the mutating
    table error?
    This link by Tom Kyte should help you with the
    "mutating table" error.
    http://asktom.oracle.com/tkyte/Mutate/index.html
    pratzPratz,
    Thanks for the quick reply. I am trying to create a temp table (log_table) but having the "insufficient privilages" issues.
    Thanks,
    Chiru

  • I have a cd changer cdp-cx355 showing table error, think it was knocked out of alignment while being

    I have a cd changer cdp-cx355 showing table error, think it was knocked out of alignment while being moved how do you make sure its aligned

    Welcome to Apple Discussions, rnmed13
    Sorry you are still having problems.
    See if this post by parkersal helps you:
    http://discussions.apple.com/message.jspa?messageID=4246676#4246676
    Jim
      Mac OS X (10.4.9)    G5 DP 1.8  External iSight

  • Drop and recreate table in stored procedure

    Hi all
    When creating tables using Transact-SQL scripts, I have always preferred to drop the table if it exists and then create it explicitly using CREATE TABLE.  For two reasons:
    1) It does not matter if it is the first time the SP is run ie. if I create the table manually in the first instance and just use TRUNCATE TABLE it could fail if the table is deleted
    2) I have control over the data types of the table fields
    Just recently though I discovered the error that can occur when dropping and creating a table in the same batch (see link below)
    Microsoft Website
    This causes me a problem when dropping and creating tables in stored procedures, as I understand that a stored procedure is in itself a single batch?
    Can I avoid this error in a stored procedure whilst continuing to drop and create tables?  Or should I be taking a different approach?
    Coding best practice advice would be greatly appreciated.
    Thank you

    Thanks Ronen
    Please see my second post immediately before your reply.
    Given that I need to store the data output in a physical table for use in QlikView, would you suggest truncating the table each time the SP runs?  And then having a script that handles both dropping and creating the physical table, and also creating
    the SP?
    >> QlikView
    QlikView is an Israeli company, right?
    In any case I am not familiar with QlikView's application, therefore I can only give you general information, based on assumptions regarding the application, and facts regarding the SQL Server.
    >> for use in QlikView
    I assume that external application use specific database structure (table
    structure) and it is change only in rare situations (for example CMS interface might change the tables if and when a module s update/install). In this case there is no need to drop the table and recreate it and TRUNCATE is the solution.
    >> would you suggest truncating the table each time the SP runs
    I am sorry but i cant recommend on TRUNCATE a table each time you execute SP, without know the exact reason for this logic. It sound to me, at this point of time (with the information that we have), that this
    is very bad logic (application architecture). As I wrote above, basing your application on TRUNCATING the table each time mean that you have problems with multi users. Thins about 2 people that try to execute the same SP at almost the same time. Think about
    locking in the SQL Server and bad data (one truncate while the other already inserted the new data and get no rows, if there is no locking).
    But TRUNCATE is much better in this case probably then DROP and DELETE, since it is faster, and locking will be shorter (hopefully the application use the correct locking). There are other reasons why TRUNCATE is better, and other people already mentioned
    most of them, but time in this scenario might be critical.
    >> having a script that handles both dropping and creating the physical table, and also creating the SP?
    I do not undestand what is this second step. we said that you truncate the table, so why do you need to
    dropping and creating the physical table and who
    creating the SP?
    Are you meaning that the application create the tables and SP?
    There are lot of application that during installation create the database structure. is this what you mean?
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Can't open and lock time zone table error on every open

    Acrobat 8 standard, windows XP Pro
    080416 14:22:43 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
    I get that error message in the log every time I open 8. What gives with this program?

    This error is usually caused by a corrupt ppt file or an incompatible font.
    A quick work around is to recreate the presentation in Keynote from scratch using the images copied from the original.

  • External table error (no data showing)

    Hi Guys,
    Need some help on my external table. I have an existing external table (MA_EXT) when I select the table no data is showing and there is no error in the log file and there is no bad file. The next thing I did to check if the error is in the file is to copy the same code and just rename the external table (MA_EXT2) and it worked just fine (data is showing no changes in the code just external table name). So the next step I did was to drop and recreate the external table (MA_EXT) but the same thing happened the data is not showing and no error in log file and no bad file.
    BTW this is in 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Has anyone encountered this? TIA...

    eadelrosario wrote:
    Hi Guys,
    Need some help on my external table. I have an existing external table (MA_EXT) when I select the table no data is showing and there is no error in the log file and there is no bad file. The next thing I did to check if the error is in the file is to copy the same code and just rename the external table (MA_EXT2) and it worked just fine (data is showing no changes in the code just external table name). So the next step I did was to drop and recreate the external table (MA_EXT) but the same thing happened the data is not showing and no error in log file and no bad file.
    BTW this is in 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Has anyone encountered this? TIA...you have a mystery & we have no clues.
    Either you are correct or Oracle is correct.
    I bet Oracle is correct more often than you.
    You are free to submit a Bug Report if you are sure that Oracle is mis-behaving.

  • Key Figure units in Fact Table - Error

    All -
    When a run a report off of a cube, some row display 0 when there are corresponding values in my cube.  The report doesn't agree with LISTCUBE.  I have ran transaction RSRV on my cube and tested the "Key figure units in fact tables of Infocube" and I get an error saying that 1380 units are missing from fact table.
    <b>Diagnosis
    In the fact table /BIC/FEU_FRCTS records have been found that contain values other than zero for key figures that have units, but that have no value for the unit of the key figure. Since the value of the unit has to correspond to the value of the key figure, this inidicates an error when the data was loaded. The values of the units have not been loaded into BW correctly. Choose Details to display the incorrect records.</b>
    Does anyone know what this error means? How do I solve this problem?
    Thanks,
    Nyrvole

    hi Nyrvole,
    as the message said, you have keyfigures with unit but the unit value not filled, click 'detail' as suggested to check which keyfigure(s) involved, that go to rsd2 type in that keyfigure and see which infoobject unit is used, then check transfer/update rules how this unit infoobject mapped, try correct the values and upload again.
    there is option 'repair' in rsrv but think in this case it can't fix the error, just try.
    hope this helps.

  • Associative array two variable comparison :update table error

    Hi,
    i am using associative array to update the version number of table
    -i declare two associative array to compare the column from two table (temp,main tables)values in loop
    -if id's of both variable(for temp and main table) are equal and column of either of table not matching then it should update the version no of temp table
    -if id's not equal i.e record only exists temp table then update null version number annd increment it by 1
    -following is the structure and procedure --it shows the matching and non matching records but for the update statement it not giving expected output i.e it updates all records irrespective of the condition provided
    -i tried to put condition in update as well as in the  if statement but it updates all record
    ....suggestion and help highly appreciate. thankx in advance !!!
    /*--table structure and data--*/
    CREATE TABLE "TEMP_TABLE"
       ( "ID" NUMBER NOT NULL ENABLE,
      "COL1" VARCHAR2(20 BYTE),
      "COL2" VARCHAR2(20 BYTE),
      "VERSION" NUMBER
       INSERT INTO TEMP_TABLE VALUES (101,'A','B',NULL);
       INSERT INTO TEMP_TABLE VALUES (102,'x','y',NULL);
       INSERT INTO TEMP_TABLE VALUES (103,'r','t',NULL);
       CREATE TABLE "MAIN_TABLE"
       ( "ID" NUMBER NOT NULL ENABLE,
      "COL1" VARCHAR2(20 BYTE),
      "COL2" VARCHAR2(20 BYTE),
      "VERSION" NUMBER
       INSERT INTO MAIN_TABLE VALUES (101,'A','B',1);
    /*------update version procedure----------*/
    DECLARE
      TYPE T_tmp_table IS TABLE OF tmp_table %ROWTYPE INDEX BY PLS_INTEGER;
      TYPE T_main_table IS TABLE OF main_table%ROWTYPE INDEX BY PLS_INTEGER;
      l_tmp_table T_tmp_table;
      l_main_table T_main_table;
      BEGIN
        SELECT * BULK COLLECT INTO l_tmp_table FROM tmp_table;
        SELECT * BULK COLLECT INTO l_main_table FROM main_table;
        FOR i IN 1 .. l_tmp_table.count
        LOOP
          FOR j IN 1 .. l_main_table.count
         LOOP
      if(l_tmp_table(i).ID = l_main_table(j).ID AND l_tmp_table(i).VERSION IS NULL) then     
      ---this first if loop updates temp table version irrespective of l_tmp_table.ID=l_main_table.ID orl_tmp_table. ID<>l_main_table.ID  .it display proper matching and non-matching records.
       dbms_output.put_line('matching ids from tmp and main are :'||l_tmp_table(i).ID||'  '||l_main_table(j).ID);
       UPDATE tmp_table SET VERSION = l_tmp_table(i).version +1;
       --where l_tmp_table(i).ID = l_main_table(j).ID     --
       end if;
      if (l_tmp_table(i).ID <> l_main_table(j).ID) then
       dbms_output.put_line('non matching ids from tmp and main are :'||l_tmp_table(i).ID||'  '||l_main_table(j).ID);
       UPDATE tmp_table SET VERSION = l_tmp_table(i).version +1;
       --where l_tmp_table(i).ID <> l_main_table(j).ID    
        end if;
              END LOOP;
              END LOOP;
        EXCEPTION
        WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('OTHER');
    END;

    Hello user8937641
    I think there is a problem with the logic of your SQL-Code.
    But maybe in this formatted structure you can see where your problem is. -> I can not say it because I do not know what is the requirement.
    I hope it helps...
    /*------update version procedure----------*/
    DECLARE
      TYPE T_tmp_table IS TABLE OF tmp_table %ROWTYPE INDEX BY PLS_INTEGER;
      TYPE T_main_table IS TABLE OF main_table%ROWTYPE INDEX BY PLS_INTEGER;
      l_tmp_table T_tmp_table;
      l_main_table T_main_table;
      BEGIN
        SELECT * BULK COLLECT INTO l_tmp_table FROM tmp_table;
        SELECT * BULK COLLECT INTO l_main_table FROM main_table;
        FOR i IN 1 .. l_tmp_table.count
        LOOP
          FOR j IN 1 .. l_main_table.count
          LOOP
            IF     l_tmp_table(i).ID = l_main_table(j).ID
               AND l_tmp_table(i).VERSION IS NULL
             THEN
                 ---this first if loop updates temp table version irrespective of l_tmp_table.ID=l_main_table.ID orl_tmp_table. ID<>l_main_table.ID  .it display proper matching and non-matching records.
                 dbms_output.put_line('matching ids from tmp and main are :'||l_tmp_table(i).ID||'  '||l_main_table(j).ID);
                 UPDATE tmp_table
                    SET version = l_tmp_table(i).version +1;
                  WHERE id = l_tmp_table(i).ID
            END IF;
            IF l_tmp_table(i).ID <> l_main_table(j).ID
             THEN
               dbms_output.put_line('non matching ids from tmp and main are :'||l_tmp_table(i).ID||'  '||l_main_table(j).ID);
               -- Maybe you do not need this update:
               UPDATE tmp_table
                  SET version = l_tmp_table(i).version +1;
                WHERE id =  l_tmp_table(i).ID
            END IF;
            COMMIT;
           END LOOP;
        END LOOP;
      EXCEPTION WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error at Executing the PLSQL-Block - ' || SQLERRM);
    END;

  • INSTEAD OF trigger on view to update a table. error in 4.2apex tabular rpt

    I have created a view (LANDINGS_VIEW') that I am hoping to use to add/modify data over several tables. I am using INSTEAD OF trigger to update/insert into the underlying tables. I am receiving the error:
    •ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at "SAFIS.LANDINGS_V_IO_UPD_TRG", line 4 ORA-04088: error during execution of trigger 'SAFIS.LANDINGS_V_IO_UPD_TRG' (Row 1)I am only setting PRICE = 300.
    any thoughts? Am I setting this up propertly? thanks for your help!!
    Karen
    The LANDING_VIEW is set up as follows:
    -- Start of DDL Script for View SAFIS.LANDINGS_VIEW
    -- Generated 03-May-2013 10:25:38 from [email protected]
    CREATE OR REPLACE VIEW landings_view (
       landing_seq,
       dealer_rpt_id,
       unit_measure,
       reported_quantity,
       landed_pounds,
       dollars,
       disposition_code,
       grade_code,
       species_itis,
       market_code,
       price,
       area_fished,
       sub_area_fished,
       lease_num,
       gear_code,
       de,
       ue,
       dc,
       uc,
       local_area_code,
       fins_attached,
       explanation,
       late_report,
       modified_data,
       nature_of_sale,
       hms_area_code,
       sale_price,
       deleted )
    AS
    select l.LANDING_SEQ,
           l.DEALER_RPT_ID,
           l.UNIT_MEASURE,
           l.REPORTED_QUANTITY,
           l.LANDED_POUNDS,
           l.DOLLARS,
           l.DISPOSITION_CODE,
           l.GRADE_CODE,
           l.SPECIES_ITIS,
           l.MARKET_CODE,
           l.PRICE,
           l.AREA_FISHED,
           l.SUB_AREA_FISHED,
           l.LEASE_NUM,
           l.GEAR_CODE,
           l.DE,
           l.UE,
           l.DC,
           l.UC,
           l.LOCAL_AREA_CODE,
           a.fins_attached,
           a.explanation,
           a.late_report,
           a.modified_data,
           a.nature_of_sale,
           a.hms_area_code,
           a.sale_price,
           a.deleted
      from landings l,
           landings_hms a
      where  l.dealer_rpt_id = v('P110_DEALER_RPT_ID') and
            l.dealer_rpt_id = a.dealer_rpt_id(+) and
            l.landing_seq = a.landing_seq(+)
    -- Triggers for LANDINGS_VIEW
    CREATE OR REPLACE TRIGGER landings_v_io_upd_trg
    INSTEAD OF
      UPDATE
    ON landings_view
    REFERENCING NEW AS NEW OLD AS OLD
    DECLARE
       v_first_day   date;
       BEGIN
    update landings set landing_seq = :old.landing_seq,
                              dealer_rpt_id = :old.dealer_rpt_id,
                              unit_measure = :new.unit_measure,
                              reported_quantity = :new.reported_quantity,  
                            --  landed_pounds = :new.landed_pounds,
                              dollars = :new.dollars,
                              disposition_code= :new.disposition_code, 
                              grade_code = :new.grade_code,
                              species_itis =  :new.species_itis,
                               market_code = :new.market_code,
                              price =  :new.price,
                              area_fished = :new.area_fished,
                              sub_area_fished = :new.sub_area_fished,
                           --   lease_num = :new.lease_num,
                              gear_code = :new.gear_code,
                              de = :new.de,
                              ue = :new.ue,
                              dc = :new.ue,
                              uc = :new.uc,
                              local_area_code =  :new.local_area_code ;     
        /*  update landings_hms  set dealer_rpt_id = :old.dealer_rpt_id,
                                 landing_seq = :old.landing_seq,
                                 fins_attached = :new.fins_attached,
                                 explanation = :new.explanation,
                                 late_report = :new.late_report,
                                 modified_data = :new.modified_data,
                                 nature_of_sale = :new.nature_of_sale,
                                 hms_area_code = :new.hms_area_code,
                                 sale_price = :new.sale_price,
                                 de = sysdate,
                                 ue = :new.ue,
                                 dc = :new.dc,
                                 uc = :new.uc ;                         
    end;
    -- End of DDL Script for Trigger SAFIS.LANDINGS_KEH_V_IO_TRG
    CREATE OR REPLACE TRIGGER landings_v_io_trg
    INSTEAD OF
      INSERT
    ON landings_view
    REFERENCING NEW AS NEW OLD AS OLD
    DECLARE
       v_first_day   date;
       BEGIN
    insert into landings_keh (landing_seq,
                              dealer_rpt_id,
                              unit_measure,
                              reported_quantity,
                              landed_pounds,
                              dollars,
                              disposition_code,
                              grade_code,
                              species_itis,
                              market_code,
                              price,
                              area_fished,
                              sub_area_fished,
                              lease_num,
                              gear_code,
                              de,
                              ue,
                              dc,
                              uc,
                              local_area_code)      
       values ( landings_seq.NEXTVAL,
                :new.dealer_rpt_id,
                :new.unit_measure,
                :new.reported_quantity,
                :new.landed_pounds,
                :new.dollars,
                :new.disposition_code,
                :new.grade_code,
                :new.species_itis,
                :new.market_code,
                :new.price,
                :new.area_fished,
                :new.sub_area_fished,
                :new.lease_num,
                :new.gear_code,
                sysdate,
                :new.ue,
                :new.dc,
                :new.uc,
                :new.local_area_code)  ;
       insert into landings_hms (dealer_rpt_id,
                                 landing_seq,
                                 fins_attached,
                                 explanation,
                                 late_report,
                                 modified_data,
                                 nature_of_sale,
                                 hms_area_code,
                                 sale_price,
                                 de,
                                 ue,
                                 dc,
                                 uc,
                                 deleted)
           values (:new.dealer_rpt_id,
                   landings_seq.CURRVAL,
                   :new.fins_attached,
                   :new.explanation,
                   :new.late_report,
                   :new.modified_data,
                   :new.nature_of_sale,
                   :new.hms_area_code,
                   :new.sale_price,
                   sysdate,
                   :new.ue,
                   :new.dc,
                   :new.uc,
                   :new.deleted);
    end;
    -- End of DDL Script for Trigger SAFIS.LANDINGS_KEH_V_IO_TRG
    -- End of DDL Script for View SAFIS.LANDINGS_VIEWbtw, I have succefully run the following update in sqlplus.
    update landings set landing_seq = 8604583,
    dealer_rpt_id = 2660038,
    unit_measure = 'LB',
    reported_quantity = 3,
    -- landed_pounds = :new.landed_pounds,
    dollars = 900,
    disposition_code= '001',
    grade_code = '10',
    species_itis = '160200',
    market_code = 'UN',
    price = 30,
    area_fished = null,
    sub_area_fished =null,
    -- lease_num = :new.lease_num,
    gear_code = '050',
    de = sysdate,
    ue = 'keh',
    dc = null,
    uc = 'keh',
    local_area_code = null
    where landing_seq = 8604583; I am using apex 4.2
    Edited by: KarenH on May 3, 2013 10:29 AM
    Edited by: KarenH on May 3, 2013 10:31 AM
    Edited by: KarenH on May 3, 2013 11:04 AM
    Edited by: KarenH on May 3, 2013 4:09 PM

    could it be so simple?
    when I created the tabular form on my view, LANDINGS_VIEW, the APPLYmru was automatically generated, referencing the view name LANDINGS_VIEW. I modified that to indicate the table name (LANDINGS). I am not certain why that would work, but it seems to so far.
    this post was helpful: Re: instead of trigger on view
    I am now testing to make certain both the underlying tables can be updated, LANDINGS and LANDINGS_HMS

  • Dbms_sql  in a different schema from query table-error  ** ORA-00942

    Oracle Experts,
    I think I am having problems with using DBMS_SQL in which the function was created in one schema and the query table was created in a different schema.
    We have 2 schemas: S1, S2
    We have 2 tables:
    T1 in Schema S1
    T2 in Schema S2
    We have a function F1 created by DBA in schema S1 that uses the dbms_sql as:
    CREATE OR REPLACE FUNCTION S1.F1(v1 in VARCHAR2) return NUMBER IS
    cursor1 INTEGER;
    BEGIN
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, v1, dbms_sql.NATIVE);
    dbms_sql.close_cursor(cursor1);
    return (0);
    EXCEPTION
    when others then
    dbms_sql.close_cursor(cursor1);
    return (1) ;
    END;
    I am using jdeveloper 11G. We have an Oracle DB 11g.
    We have a java program which uses jdbc to talk to our Oracle DB.
    Basically, in my java program, I call function F1 to check if the query is valid.
    If it is, it returns 0. Otherwise, returns 1:
    oracle.jdbc.OracleCallableStatement cstmt = (oracle.jdbc.OracleCallableStatement) connection.prepareCall ("begin ? := S1.F1 (?); end;");
    cstmt.registerOutParameter (1, java.sql.Types.INTEGER);
    cstmt.setString(2, "Select * from S2.T2");
    cstmt.execute ();
    Since the table that I run the query is T2, created in different schema than F1 was created in, I have the error:
    ** ORA-00942: table or view does not exist
    So my questions are these:
    - I am using Oracle DB 11g, if I run the query on a table that created in a different schema from the one that the function (which uses dbms_sql) was created in, I would get the error ORA-00942?
    - If I runs the query on table T1 in the same schema as the function F1, would I have the same problem(The reason I ask is I cannot create any table in schema S1 because the DBA has to do it; I am not a DBA)
    - This is not a problem, but a security feature because of SQL injection?
    - How to resolve this issue other than creating the table in the same schema as the function that utilizes DBMS_SQL?
    Regards,
    Binh

    Definer rights (default) stored objects run under owner's security domain and ignore role based privileges. So regardless what user you are logged in as, function S1.F1 always executes as user S1 and ignores user S1 roles. Therefore exeuting statement within S1.F1:
    Select * from S2.T2requires user S1 to have SELECT privilege on S2.T2 granted to S1 directly, not via role.
    SY.

Maybe you are looking for

  • Can we assign two values to the same parameter? If yes how?

    Can we assign two values to the same parameter? If yes how? For details please go through the following SAP related program. Here I need to print 2 queries using the same parameter "QUERY" the value assigned to this parameter(query) is REPORT_TEST1.

  • Message no. 06211 Currency translation error in net price calculation

    Hi,    When i am creating purchase order i am changing currency from INR to JPY for FOB condition type only, And system issuing error message Currency translation error in net price calculation. Document currency is INR. When i am using USD i am not

  • FYI OS 10.4.9 can't read dmg files on an external hard drive

    After I upgraded from 10.4.8 to 10.4.9, my G5 iMac would no longer read digital image files (dmg) stored earlier on my external hard drive. I tried various fixes from the Discussions topics. But the files would not read, giving me a: "Finder cannot c

  • Update multiple rows using CASE WHEN

    I have the table ACCOUNT of structure as follow:  ACCOUNT_ID ACCOUNT_STATUS 004460721 2 042056291 5 601272065 3 I need to update the three rows at once using one SELECT statement such that, the second column will be 5, 3, 2 respectively. I used the f

  • Create deployment profile on JDev 9.0.3.2 build 1145 doesn't

    Don't ask, I need to use this version for an old 9iAS portlet project. Running JDeveloper on SuSE 9.2 Pro Linux I can compile fine, but attempting to create a deployment profile (r click on project->new->deployment profiles->jar file, simple archive)