Forall issue when inserting on remote table

Hi all,
when I run this code, it works:
forall i in 1..insCounter
insert into table_name
values(
IdArray(i),
RefererArray(i),
UserAgentArray(i),
LanguageArray(i));
but when I try to do the same on a remote table(same structure):
forall i in 1..insCounter
insert into table_name@DBLINK
values(
IdArray(i),
RefererArray(i),
UserAgentArray(i),
LanguageArray(i));
all inserted values are null...
Any idea?
Thanks

I've got very similar problem some months ago. After some back and forth stage I've realized that the problem was in some expressions in source query that used locally defined PL/SQL functions. It appeared that Oracle tried to execute this local functions on remote server and finalyy I've got an error
ORA-04052: error occurred when looking up remote object <schema>.<package name>@<local server url>
When I removed the calls to local functions everything began to work fine.
What are exact expressions for columns in your
select col_1,...,col_n
from local_table
Are there any function calls there?
Cheers

Similar Messages

  • Problem encountered when join two remote tables in a materialized view

    I'm using oracle 9.2.0.6
    1> I have two tables:
    CREATE TABLE TEST
    A VARCHAR2(100 BYTE),
    C DATE
    CREATE TABLE TEST1
    A VARCHAR2(100 BYTE),
    B TIMESTAMP
    2>. I defined a prebuild table:
    CREATE TABLE MV_TEST1
    ID1 ROWID,
    A VARCHAR2(100 BYTE),
    ID2 ROWID,
    B TIMESTAMP(6),
    C DATE
    3> I created mview logs:
    CREATE MATERIALIZED VIEW LOG ON PSI_TEST.TEST
    WITH ROWID
    INCLUDING NEW VALUES;
    CREATE MATERIALIZED VIEW LOG ON PSI_TEST.TEST1
    WITH ROWID
    INCLUDING NEW VALUES;
    4> when I create mview:
    CREATE MATERIALIZED VIEW PSI_TEST.MV_TEST1
    ON PREBUILT TABLE WITH REDUCED PRECISION
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY
    AS
    select
    test.rowid id1,
    test.a,
    test1.rowid id2,
    test1.b,
    cast(null as date) c
    from test , test1
    where test.a = test1.a(+);
    It is created successfully.
    5> problem:
    when I use remote tables to do the same thing, say test and test1 are in another instance and are connected by a dbLink, I couldn't create the mview successfully:
    CREATE MATERIALIZED VIEW PSI_TEST.MV_TEST1
    ON PREBUILT TABLE WITH REDUCED PRECISION
    REFRESH FAST ON DEMAND
    WITH PRIMARY KEY
    AS
    select
    a.rowid id1,
    a.a,
    b.rowid id2,
    b.b,
    cast(null as date) c
    from test@dbl a, test1@dbl b
    where a.a = b.a(+);
    when run above statement, I got:
    ORA-12015: cannot create a fast refresh materialized view from a complex query
    Any ideas? Or joining two table through a dblink for a mview is not allowed at all?
    Thanks in advance.

    No one has a clue?
    Message was edited by:
    lzhwxy

  • " Error when inserting in PSA table RSTSODSPART" when loading into PSA

    Hello,
    Did anyone encounter something similar, and found a solution ?
    BI 7.0 -  EnhP 1 - SP5
    When loading data from R/3 into PSA, we encounter following error message:
    " Error when inserting in PSA table RSTSODSPART"
    ===============================================================
    - the first datapackage is written successfully to PSA,
    but from the second datapackage onwards the error message pops-up
    " Error when inserting in PSA table RSTSODSPART"
    - The original dataselection in the infopackage is somewhere stored
    If the selection in the InfoPackage is reduced (e.g. only one document i.o. a period)
    it stil starts loading according the original selection (the month)
    - If we create a new InfoPackage and select very few data (only one datapackage)
    then we can load to PSA succesfully, but when we load to DSO we can't activate the DSO.
    - We remarked that:
    Two versions of the PSA exist for that datasource 0FI_GL_40:
    a Table(/BIC/B0000555000) in version 1 exists,
    a Table(/BIC/B0000555001) in version 2 exists
    Thanks in advance,
    Best regards

    Hello All,
    We had a problem similar to what Ilse Depoortere describes. The problem happens in our BW QA system a few days/weeks after it has been copied from Production. Data loads start failing with these two error messages:
    RSM2 851 - Error when writing in PSA (Caller 32)
    RSAR 130 - Error 7 when adding to PSA (Caller 70)
    We have just implemented the fix described in note 1340371 (replaced the LIB_DBSL with patch level 247), and the problem is gone. Failed data load process chains can be restarted and finish successfully.
    This has been a really useful discussion, thanks all! And thanks to my coworker Bob who found it.
    Vince Vajda

  • Issue with query involving remote tables

    Hi I have a query inside a procedure that has 4 union all statements ,2 of which are based on tables at a remote database.
    The query is something like
    Select col1, col2, col3…..col n from Table_a, table_b, table c where join condition and certain hard-coded conditions based on run time parameters
    Union all
    Select col1, col2, col3…..col n from Table_a, table_b , table c where some join condition and certain hard-coded conditions based on run time parameters
    Union all
    Select col1, col2, col3…..col n from Table_a@remote_db, table_b@remote_db, table c@remote_db where join condition and certain hard-coded conditions based on run time parameters
    Union all
    Select col1, col2, col3…..col n from Table_a @remote_db, table_b @remote_db, table c@ remote_db where some join condition and certain hard-coded conditions based on run time parameters
    The join conditions on the tables are quite good and when executed individually bring data in good time.The queries on the remote database also run fine when I execute them in the remote database.
    However when I run this query, it doesn’t get data at all and after hours of running I have to cancel or kill it.I don’t get anything in the long-ops and in the wait class it just shows “SQL*Net message from dblink” or “SQL*Net more data to dblink”.
    I thought that there could be some latency issues AND the data retreival over the dblink could be slow, so I tried the /*+driving_site(rmote table alias)*/ hint , after which it comes up in the long ops as its reading from Table a/ table b from my current database but the wait time is something like millions of seconds and it runs forever.
    The issue is Table A and Table B both in the remote and the current database are huge tables with at least 40-50 million records in them.
    Can anyone suggest an easy way out in this scenario, other than the hard way of re-designing the entire program(which I am afraid I might have to in the end).
    Thanks

    @metzquar I Put the hint in the unions where I am accessing the remote tables
    @blushadow .. i was thinking about that but as these remote tables are in a sort of archived database, I dont think I will be allowed to create a mview.But thats a good suggestion.
    @Earth.. I tried that , but the table population itself gets very time consuming
    Thanks

  • Unable to insert into remote table

    I have created a dblink (public), and a synonym(synonym1) pointing to a table in the remote database.
    When I try to create a form based on the synonym the form creation fails with many errors saying "Synonym Trnslation no longer supported". I have tested the synonym via a dynamic page an it is valid and working.
    I then try to refer to the object directly by using owner.table@dblink. This works fine until I try and insert into the remote table. Then I get the error "An unexpected error occurred: ORA-22816: unsupported feature with RETURNING clause (WWV-16016) ". Has anyone solved this. I can only assume that portal can somehow insert data into a remote table via a form. What use is it if it cant???

    I am not clear on that Synonym ... but the following note solved the problem:
    Subject: How to create a form on a view (and avoid WWV-16016)
    Doc ID: Note:155654.1 Type: PROBLEM
    Last Revision Date: 19-MAR-2003 Status: PUBLISHED
    Problem Description
    Portal 3.0.9.X
    If you create an updateable view on two tables, with the needed
    associated "INSTEAD_OF" trigger to perform the insert or update.
    A Form on this view created in Portal returns the following error on
    insert or update:
    An unexpected error occurred: ORA-22816: unsupported feature with
    RETURNING clause (WWV-16016).
    Let's take a sample:
    CREATE OR REPLACE VIEW V_EMP_DEPT ( EMPNO,
    ENAME, JOB, DEPTNO, DNAME,
    LOC ) AS select
    e.empno
    ,e.ename
    ,e.job
    ,d.deptno
    ,d.dname
    ,d.loc
    from emp e, dept d
    where e.deptno = d.deptno
    grant select,insert,update,delete on v_emp_dept to public;
    create or replace TRIGGER VEMPDEPT_INSTEAD_OF_TRG
    INSTEAD OF UPDATE or INSERT
    ON v_emp_dept
    REFERENCING OLD AS OLD NEW AS NEW
    declare
    begin
    if updating then
    if :new.empno != :old.empno then
    raise_application_error(20001,'EMPNO could not be modified');
    end if;
    if :new.loc != :old.loc then
    raise_application_error(20001,'LOC could not be modified');
    end if;
    if :new.dname != :old.dname then
    raise_application_error(20001,'dname could not be modified');
    end if;
    if :new.ename != :old.ename then
    update emp set ename=:new.ename where empno = :old.empno;
    end if;
    if :new.job != :old.job then
    update emp set job=:new.job where empno = :old.empno;
    end if;
    if :new.deptno != :old.deptno then
    update emp set deptno=:new.deptno where empno = :old.empno;
    end if;
    end if;
    if inserting then
    -- specify only valid deptumbers
    insert into emp(empno,ename,job,deptno) values
    (:new.empno,:new.ename,:new.job,:new.deptno);
    end if;
    end;
    - Create a "Forms Based on a Table or View" on this view : 'V_EMP_DEPT'
    - In the step 4, choose 'order by dname' in place of 'rowid'
    The rest is default
    - Run the form
    - Push on the button query
    - change one of the field and push the update button
    You will see the error
    Error: An unexpected error occurred: ORA-22816: unsupported feature
    with RETURNING clause (WWV-16016)
    Explanation
    You are running in Bug 1589656. The code generated by Portal is using
    RETURN clause for the UPDATE or INSERT SQL call to get the ROWID.
    This is not possible on a VIEW created on two (or more) tables.
    Solution Description
    A possible workaround is to replace the insert button code and update button
    code with calls to procedures doing exactly what is done in the trigger.
    Assumption is made that the empno column could not be updated.
    This implies that the validation options updatable checkbox for the empno column
    is unchecked.
    In the above example, this gives:
    -- procedure to insert data as done in the trigger
    create or replace procedure V_EMP_DEPT_INSERT(
    p_session in out PORTAL30.wwa_api_module_session
    IS
    "_block" varchar2(30) := 'DEFAULT';
    rec SCOTT.V_EMP_DEPT%ROWTYPE;
    begin
    rec.EMPNO:=p_session.get_value_as_NUMBER(
    p_block_name => "_block",
    p_attribute_name => 'A_EMPNO',
    p_index => 1
    rec.ENAME:=p_session.get_value_as_VARCHAR2(
    p_block_name => "_block",
    p_attribute_name => 'A_ENAME',
    p_index => 1
    rec.JOB:=p_session.get_value_as_VARCHAR2(
    p_block_name => "_block",
    p_attribute_name => 'A_JOB',
    p_index => 1
    rec.DEPTNO:=p_session.get_value_as_NUMBER(
    p_block_name => "_block",
    p_attribute_name => 'A_DEPTNO',
    p_index => 1
    insert into scott.emp(empno,ename,job,deptno)
    values (rec.empno,rec.ename,upper(rec.job),rec.deptno);
    exception
    when others then
    rollback;
    raise;
    end;
    -- procedure that update data as done in the trigger
    create or replace procedure V_EMP_DEPT_UPDATE(
    p_session in out PORTAL30.wwa_api_module_session
    IS
    "_block" varchar2(30) := 'DEFAULT';
    old_rec SCOTT.V_EMP_DEPT%ROWTYPE;
    new_rec SCOTT.V_EMP_DEPT%ROWTYPE;
    begin
    new_rec.EMPNO:=p_session.get_value_as_NUMBER(
    p_block_name => "_block",
    p_attribute_name => 'A_EMPNO',
    p_index => 1
    new_rec.ENAME:=p_session.get_value_as_VARCHAR2(
    p_block_name => "_block",
    p_attribute_name => 'A_ENAME',
    p_index => 1
    new_rec.JOB:=p_session.get_value_as_VARCHAR2(
    p_block_name => "_block",
    p_attribute_name => 'A_JOB',
    p_index => 1
    new_rec.DEPTNO:=p_session.get_value_as_NUMBER(
    p_block_name => "_block",
    p_attribute_name => 'A_DEPTNO',
    p_index => 1
    new_rec.LOC:=p_session.get_value_as_NUMBER(
    p_block_name => "_block",
    p_attribute_name => 'A_LOC',
    p_index => 1
    select empno, ename, job, deptno, loc
    into old_rec.empno, old_rec.ename, old_rec.job,
    old_rec.deptno, old_rec.loc from scott.V_EMP_DEPT
    where empno = new_rec.empno;
    if new_rec.empno != old_rec.empno then
    raise_application_error(20001,'EMPNO could not be modified');
    end if;
    if new_rec.loc != old_rec.loc then
    raise_application_error(20001,'LOC could not be modified');
    end if;
    if new_rec.dname != old_rec.dname then
    raise_application_error(20001,'dname could not be modified');
    end if;
    if new_rec.ename != old_rec.ename then
    update scott.emp set ename=new_rec.ename where empno =
    old_rec.empno;
    end if;
    if new_rec.job != old_rec.job then
    update scott.emp set job=new_rec.job where empno = old_rec.empno;
    end if;
    exception
    when NO_DATA_FOUND then
    raise_application_error(20001,'EMPNO could not be modified');
    end;
    After creating this two procedures you have to edit the form and replace the
    Insert and Update button PLSQL event handling code.
    For the insert button: Select Insert in the PL/SQL Button Event Handler window
    and replace the original code with the following one::
    --- Type your PL/SQL code here...
    -- doInsert;--- This is the default handler
    --- ...and here, thanks...
    V_EMP_DEPT_INSERT( p_session => p_session);
    For the update button: Select Update in the PL/SQL Button Event Handler window
    and replace the original code with the following one:
    --- Type your PL/SQL code here...
    -- doUpdate;--- This is the default handler
    --- ...and here, thanks...
    V_EMP_DEPT_UPDATE( p_session => p_session );
    Remarks
    1) Don't forget to uncheck the updatable validation option for the empno column or
    you may see some errors raised by the update procedure or update the wrong record.
    2) If you don't want to write the "instead of trigger", you can simplify
    the code above by:
    - writing no instead of trigger at all
    - write the logic to the underlying tables in PL/SQL trigger of Portal
    ( here V_EMP_DEPT_UPDATE, V_EMP_DEPT_INSERT)
    - Manohar

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Getting an error when inserting a big table inside a ""-

    hi iam getting an error String not properly closed when i add big table inside a "".plz give me an idea how to insert a table inside a String.iam using jsp .
    thanks in advance

    1) Please use proper English grammar, spelling, punctuation, and capitalization.
    2) I don't know what you mean "convert this forum page to a Word doc." Are you talking about taking HTML that's served up from some arbitrary URL and saving it in a Word doc? If so, you would not have the page's content hardcoded in your JSP. If you need to hardcode the page's content in your JSP, then I'm still not understanding what you're doing.
    3) If you want to write it out in .doc format, then you need to use a library that can write that format, such as POI from jakarta: http://jakarta.apache.org/poi/
    4) Don't tell me not to say I don't understand. If I don't understand what you're saying, I'm going to say so. It would be stupid for me to pretend I understand when I don't.
    I don't think I can help you. Good luck.

  • Multi-track duration issue when inserting clips

    I apologize if I missed this anywhere.  Tried to search first.
    I'm using Audition cs6 and I have a clip in my waveform viewer.  I have already created a new multi-track session that matches the specs of the source files.
    HOWEVER, when I make a selection on the source file and select "Insert into multitrack" and then select the session, it inserts it 14-hours and 22-minutes into the blank 30-second session.  This throws off the whole viewing slider and it becomes very difficult to manipulate the timeline.  If I simply drag the file from the browser and then re-trim it, it's fine, but not using the insert command.
    Why is this and is there a way to correct this?
    Any help would be wonderful
    -Todd
    Windows 7 64bit
    12GB RAM
    Production Premium CS6

    It sounds like the file has BWF Time Reference metadata embedded.  You can verify this by opening Window > Metadata and under the BWF tab, check the Time Reference field.  To disable this behavior, uncheck Preferences > Multitrack > Use embedded timecode when inserting clips into Multitrack.

  • Issue when inserting Child Entity (Notes) with Contact

    Hi,
    I am getting the following error message when inserting Contacts with a child entity i.e. Notes which is quite misleading
    SOAP fault from Item: OnDemandServicesObjMgr_eng_44477.log(SBL-DAT-00542)Method 'SetFieldValue' of business component 'Contact Note' (integration component 'Contact_Contact Note') returned the following error: "Access denied.(SBL-DAT-00542)"(SBL-EAI-04376
    As suggested in earlier post I have tried providing values for fields NotesID and ContactID as well and even though it gives this error message.
    Thanks
    Arif

    Hi, From the error message it looks like the access profile settings for the WS user doesn't have required privileges to create a note for contact. You make have to check access profile settings first and then try it
    -- Venky CRMIT

  • Performance issue when inserting into spatial indexed table with JDBC

    We have a table named 'feature' which has a "sdo_geometry" column, and we created spatial index on that column,
    CREATE TABLE feature ( id number, desc varchar, oshape sdo_gemotry)
    CREATE INDEX feature_sp_idx ON feature(oshape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    Then we executed the following SQL to insert about 800 records into that table(We tried this by using DB visualizer and
    our Java application, both of them were using JDBC driver to connect to the oracle 11gR2 database) .
    insert into feature(id,desc,oshape) values (1001,xxx,xxxxx);
    insert into feature (id,desc,oshape) values (1002,xxx,xxxxx);
    insert into feature (id,desc,oshape) values (1800,xxx,xxxxx);
    We encoutered the same problem as this topic
    Performance of insert with spatial index
    It takes nearly 1 secs for inserting one record,compare to 50 records inserted per sec without spatial index,
    which is 50x drop in peformance when doing insertion with spatial index.
    However, when we copy and paste those insertion scripts into Oracle Client(same test and same table with spatial index), we got a totally different performance result:
    more than 50 records inserted in 1 secs, just as fast as the insertion without building spatial index.
    Is it because Oracle Client is not using JDBC? Perhaps JDBC was got something wrong when updating those spatial indexed tables.
    Edited by: 860605 on 19/09/2011 18:57
    Edited by: 860605 on 19/09/2011 18:58
    Edited by: 860605 on 19/09/2011 19:00

    Normally JDBC use auto-commit. So each insert can causes a commit.
    I don't know about Oracle Client. In sqlplus, insert is just a insert,
    and you execute "commit" to explicitly commit your changes.
    So maybe this is the reason.

  • Issues when Insert and Analyze at the same time

    Hi All,
    We have a weekend job that used to take 12-15 hours usually and insert around 8 millions of records to a table from external table. Last weekend the same load took 60 hours and it move to Monday and there are some business impact.
    While we investigate the same issue we identified that there is one more weekend analyze job for all the tables and indexes and took around almost same time and we noticed that the table we inserted the 8 million records alone it took around 15 hours. This table now has around 91 Core records.
    We need to identify why this jobs taken long time as almost 4 times compare to the normal scenario.
    I would like to know what exactly happen when Analyze and insert happened to the table at the same time. And What all issues can occur because this.
    Best Regards,
    Shijo

    Ok,
    It is unclear what version you are using as you forgot to post that.
    Furthermore it is unclear what 'Analyze' is, as analyze statistics was already deprecated in 9i.
    Secondly, most people is this forum speak English, and they are accustomed international units only.
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-01747 when updating a remote table

    Hi,
    Here is my table :
    SQL> desc infolig2.pylone_type
    Nom NULL ? Type
    PYL_CODE_PYLONE NOT NULL VARCHAR2(32)
    OPY_CODE NOT NULL VARCHAR2(32)
    NPY_CODE NOT NULL VARCHAR2(32)
    PYL_TENS_CONS VARCHAR2(32)
    PYL_NB_TERNE FLOAT(126)
    PYL_HAUT_TOTAL FLOAT(126)
    PYL_HAUT_SS_CONS FLOAT(126)
    PYL_POIDS FLOAT(126)
    PYL_SURFACE_SOL FLOAT(126)
    PYL_SURFACE_PEINTE FLOAT(126)
    PYL_DATE_CREAT NOT NULL DATE
    PYL_DATE_MODIF DATE
    PYL_TYPE_MODIF VARCHAR2(1)
    PYL_CODE_UTIL VARCHAR2(20)
    PYL_DESIGNATION VARCHAR2(50)
    PYL_ETAT VARCHAR2(15)
    PYL_INDICE_REV VARCHAR2(3)
    I need to update it from a remote database.
    So, I run the following procedure :
    set serveroutput on
    declare
    GET_DESIGNATION VARCHAR2(10) := 'AUVERGNE';
    OIP_PYL_CODE_PYLONE VARCHAR2(32) := 'TEST1';
    OIP_OPY_CODE VARCHAR2(32) := 'ORIG3';
    OIP_NPY_CODE VARCHAR2(32) := 'NATPYL2';
    OIP_PYL_TENS_CONS VARCHAR2(32) := null;
    OIP_PYL_NB_TERNE FLOAT := 1;
    OIP_PYL_HAUT_TOTAL FLOAT := null;
    OIP_PYL_HAUT_SS_CONS FLOAT := null;
    OIP_PYL_POIDS FLOAT := null;
    OIP_PYL_SURFACE_SOL FLOAT := null;
    OIP_PYL_SURFACE_PEINTE FLOAT := null;
    OIP_PYL_DATE_CREAT DATE := SYSDATE;
    OIP_PYL_DATE_MODIF DATE := SYSDATE;
    OIP_PYL_TYPE_MODIF VARCHAR2(1) := 'M';
    OIP_PYL_CODE_UTIL VARCHAR2(20) := 'RTE REFERENCE';
    OIP_PYL_DESIGNATION VARCHAR2(50) := 'TEST 1';
    OIP_PYL_ETAT VARCHAR2(15) := 'interdit';
    OIP_PYL_INDICE_REV VARCHAR2(3) := '23';
    OIP_PYL_CODE_PYLONE_SUBST VARCHAR2(32) := 'CODEPYL5';
    begin
    execute immediate 'UPDATE infolig2.PYLONE_TYPE@'||GET_DESIGNATION||' SET
    PYL_CODE_PYLONE = :1,
    OPY_CODE = :2,
    NPY_CODE = :3,
    PYL_TENS_CONS = :4,
    PYL_NB_TERNE = :5,
    PYL_HAUT_TOTAL = :6,
    PYL_HAUT_SS_CONS = :7,
    PYL_POIDS = :8,
    PYL_SURFACE_SOL = :9,
    PYL_SURFACE_PEINTE = :10,
    PYL_DATE_CREAT = :11,
    PYL_DATE_MODIF = :12,
    PYL_TYPE_MODIF = :13,
    PYL_CODE_UTIL = :14,
    PYL_DESIGNATION = :15,
    PYL_ETAT = :16,
    PYL_INDICE_REV = :17,
    WHERE PYL_CODE_PYLONE = :18'
    USING OIP_PYL_CODE_PYLONE,OIP_OPY_CODE,OIP_NPY_CODE,OIP_PYL_TENS_CONS,OIP_PYL_NB_TERNE,OIP_PYL_HAUT_TOTAL,OIP_PYL_HAUT_SS_CONS,OIP_PYL_POIDS,OIP_PYL_SURFACE_SOL,OIP_PYL_SURFACE_PEINTE,OIP_PYL_DATE_CREAT,OIP_PYL_DATE_MODIF,OIP_PYL_TYPE_MODIF,OIP_PYL_CODE_UTIL,OIP_PYL_DESIGNATION,
    upper(translate(OIP_PYL_ETAT,'éè','ee')),OIP_PYL_INDICE_REV, OIP_PYL_CODE_PYLONE_SUBST;
    exception
    when others then
    dbms_output.put_line('ERREUR ORACLE DETECTEE ***');
    dbms_output.put_line('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    end;
    I receive the error :
    ORA-01747: invalid user.table.column, table.column, or columns specification
    What is the problem ?
    Regards,
    Rachel

    This reply was very useful for me. I have written insert scripts in the package where I had put comma after last_updated_date in the insert statement, I got the error -
    ORA-01747: invalid user.table.column, table.column, or column specification . After removing the comma and adding right parenthesis it worked fine
    INSERT INTO CPT_ACTIVITY_SALES (
    WS_DATE,
    ACTIVITY,
    WS_ITEM_HEAD,
    WS_FLAG,
    CREATED_BY,
    CREATED_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATED_DATE,
    (SELECT a.ws_date,
    b.activity,
    C.WS_ITEM_HEAD,
    'N',
    cUser ,
    SYSDATE,
    cUser,
    SYSDATE
    FROM CPT_SALES_LINES a,cpm_category b,CPM_ACTIVITY C
    WHERE a.COMPANY=nCompany
    AND a.SITE=ln_site
    AND a.WS_DATE=ld_ws_date
    AND a.SALES_HEADER_KEY=ln_Sales_header_key
    and B.company=A.company
    and b.category_id=a.category_id
    AND C.COMPANY=A.COMPANY
    AND C.ACTIVITY=B.ACTIVITY)

  • Error when inserting in a table with an identity column

    Hi,
    I am new to Oracle SOA suite and ESB.
    I have been through the Oracle training and have worked for about 2 months with the tooling.
    We have a Database adabter that inserts data in 5 Tables with relations to each other.
    Each table has his own not NULL Identity column.
    When running/ testing the ESB service we get the error at the end of this post.
    From this we learned that the Database adapter inserts the value NULL in the identity column.
    We cannot find in the documentation how to get the database adabter to skip this first column and ignore it.
    Is this possible within the wizard? Our impression is no
    Is this possible somwhere else/
    And if so How can we do this?
    If anyone can help it would be greatly appreciated
    Pepijn
    Generic error.
    oracle.tip.esb.server.common.exceptions.BusinessEventRejectionException: An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/GVB_PDI_PDI_Wegschrijven_Medewerkergegevens/testurv.wsdl [ testurv_ptt::insert(VastAdresCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [testurv.VastAdres]. [Caused by: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [testurv.VastAdres]. [Caused by: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.]
    Caused by Uitzondering [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Interne uitzondering: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert explicit value for identity column in table 'VastAdres' when IDENTITY_INSERT is set to OFF.Foutcode: 544
    Call:INSERT INTO dbo.VastAdres (ID, BeginDatum, Einddatum, Land, Plaats, Postcode, VolAdres) VALUES (?, ?, ?, ?, ?, ?, ?)
         bind => [null, 1894-06-24 00:00:00.0, 1872-09-04 00:00:00.0, Nederland, Wijdewormer, 1456 NR, Oosterdwarsweg 8]
    Query:InsertObjectQuery(<VastAdres null />).

    Hi,
    Click on the resources tab in the ESB system/ Project to see the ESB system design and all the components in it.
    Click on the Database adapter that you want to edit..and make the necesary changes..
    Check this link.
    http://download-uk.oracle.com/docs/cd/B31017_01/core.1013/b28764/esb008.htm for "6.8.2 How to Modify Adapter Services" section.
    If you are calling a database procedure which inturn makes the insert, you will have to make changes in the database and you job would be much simpler. It seems there are limitations on what you can change in the Database adapter once it is created. Please check the link for further details.
    Thanks,
    Rajesh

  • SQL Query produces different results when inserting into a table

    I have an SQL query which produces different results when run as a simple query to when it is run as an INSERT INTO table SELECT ...
    The query is:
    SELECT   mhldr.account_number
    ,        NVL(MAX(DECODE(ap.party_sysid, mhldr.party_sysid,ap.empcat_code,NULL)),'UNKNWN') main_borrower_status
    ,        COUNT(1) num_apps
    FROM     app_parties ap
    SELECT   accsta.account_number
    ,        actply.party_sysid
    ,        RANK() OVER (PARTITION BY actply.table_sysid, actply.loanac_latype_code ORDER BY start_date, SYSID) ranking
    FROM     activity_players actply
    ,        account_status accsta
    WHERE    1 = 1
    AND      actply.table_id (+) = 'ACCGRP'
    AND      actply.acttyp_code (+) = 'MHLDRM'
    AND      NVL(actply.loanac_latype_code (+),TO_NUMBER(SUBSTR(accsta.account_number,9,2))) = TO_NUMBER(SUBSTR(accsta.account_number,9,2))
    AND      actply.table_sysid (+) = TO_NUMBER(SUBSTR(accsta.account_number,1,8))
    ) mhldr
    WHERE    1 = 1
    AND      ap.lenapp_account_number (+) = TO_NUMBER(SUBSTR(mhldr.account_number,1,8))
    GROUP BY mhldr.account_number;      The INSERT INTO code:
    TRUNCATE TABLE applicant_summary;
    INSERT /*+ APPEND */
    INTO     applicant_summary
    (  account_number
    ,  main_borrower_status
    ,  num_apps
    SELECT   mhldr.account_number
    ,        NVL(MAX(DECODE(ap.party_sysid, mhldr.party_sysid,ap.empcat_code,NULL)),'UNKNWN') main_borrower_status
    ,        COUNT(1) num_apps
    FROM     app_parties ap
    SELECT   accsta.account_number
    ,        actply.party_sysid
    ,        RANK() OVER (PARTITION BY actply.table_sysid, actply.loanac_latype_code ORDER BY start_date, SYSID) ranking
    FROM     activity_players actply
    ,        account_status accsta
    WHERE    1 = 1
    AND      actply.table_id (+) = 'ACCGRP'
    AND      actply.acttyp_code (+) = 'MHLDRM'
    AND      NVL(actply.loanac_latype_code (+),TO_NUMBER(SUBSTR(accsta.account_number,9,2))) = TO_NUMBER(SUBSTR(accsta.account_number,9,2))
    AND      actply.table_sysid (+) = TO_NUMBER(SUBSTR(accsta.account_number,1,8))
    ) mhldr
    WHERE    1 = 1
    AND      ap.lenapp_account_number (+) = TO_NUMBER(SUBSTR(mhldr.account_number,1,8))
    GROUP BY mhldr.account_number;      When run as a query, this code consistently returns 2 for the num_apps field (for a certain group of accounts), but when run as an INSERT INTO command, the num_apps field is logged as 1. I have secured the tables used within the query to ensure that nothing is changing the data in the underlying tables.
    If I run the query as a cursor for loop with an insert into the applicant_summary table within the loop, I get the same results in the table as I get when I run as a stand alone query.
    I would appreciate any suggestions for what could be causing this odd behaviour.
    Cheers,
    Steve
    Oracle database details:
    Oracle Database 10g Release 10.2.0.2.0 - Production
    PL/SQL Release 10.2.0.2.0 - Production
    CORE 10.2.0.2.0 Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    Edited by: stevensutcliffe on Oct 10, 2008 5:26 AM
    Edited by: stevensutcliffe on Oct 10, 2008 5:27 AM

    stevensutcliffe wrote:
    Yes, using COUNT(*) gives the same result as COUNT(1).
    I have found another example of this kind of behaviour:
    Running the following INSERT statements produce different values for the total_amount_invested and num_records fields. It appears that adding the additional aggregation (MAX(amount_invested)) is causing problems with the other aggregated values.
    Again, I have ensured that the source data and destination tables are not being accessed / changed by any other processes or users. Is this potentially a bug in Oracle?Just as a side note, these are not INSERT statements but CTAS statements.
    The only non-bug explanation for this behaviour would be a potential query rewrite happening only under particular circumstances (but not always) in the lower integrity modes "trusted" or "stale_tolerated". So if you're not aware of any corresponding materialized views, your QUERY_REWRITE_INTEGRITY parameter is set to the default of "enforced" and your explain plan doesn't show any "MAT_VIEW REWRITE ACCESS" lines, I would consider this as a bug.
    Since you're running on 10.2.0.2 it's not unlikely that you hit one of the various "wrong result" bugs that exist(ed) in Oracle. I'm aware of a particular one I've hit in 10.2.0.2 when performing a parallel NESTED LOOP ANTI operation which returned wrong results, but only in parallel execution. Serial execution was showing the correct results.
    If you're performing parallel ddl/dml/query operations, try to do the same in serial execution to check if it is related to the parallel feature.
    You could also test if omitting the "APPEND" hint changes anything but still these are just workarounds for a buggy behaviour.
    I suggest to consider installing the latest patch set 10.2.0.4 but this requires thorough testing because there were (more or less) subtle changes/bugs introduced with [10.2.0.3|http://oracle-randolf.blogspot.com/2008/02/nasty-bug-introduced-with-patch-set.html] and [10.2.0.4|http://oracle-randolf.blogspot.com/2008/04/overview-of-new-and-changed-features-in.html].
    You could also open a SR with Oracle and clarify if there is already a one-off patch available for your 10.2.0.2 platform release. If not it's quite unlikely that you are going to get a backport for 10.2.0.2.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Getting error when inserting Web API/Table Inteface class in Web Template !

    Hi Experts,
    I am getting error -- Invalid Renderer class: '&1' ZTEST_BWREPORT_ADI
    while inserting the <param name="ITEM_CLASS" value="ZTEST_BWREPORT_ADI"/> in HTML code of the template, having one table web item, before  <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/> statement to get the customization I have done in ZTEST_BWREPORT_ADI as per table interface.
    Please look into the issue and try to suggest the possible solutions as soon as possible.
    Regards,
    Aditya Srivastava.

    Hi,
    The got the solution which is nothing tricky. I have to just insert <param name = "MODIFY_CLASS" value = "ZTEST_BWREPORTS_ADI"/> after <param name = "ITEM_CLASS" value = "CL_RSR_WWW_ITEM_GRID"> to get the desired result. Though I don't know what might be the reason (since I am very new to BW) but atleast the thing is working.
    Regards,
    Aditya Srivastava.

Maybe you are looking for

  • What's the best Mac for editing HD video

    I have a 2009 2.66 quad core Power Mac with the RAM maxed out at 16Gb, 1066MHZ DDR3.  The OS is 10.6.8.  I edit using FC 7 pro.   I am editing HD footage from a Canon Vixia HF G10, which uses AVCHD on the camera and imports files to the computer as A

  • Cannot see via projector connected to thunderbolt port

    I bought a connector: thunderbolt port to VGA (15 pin), but cannot see the VGA projector on my MacBook Air.

  • Export and import tables in SYBASE ASE

    HI All, Could you give an idea on taking logical structure backups on Sybase database . And how to restore this backup . Similar to exp/imp or expdp/impdp  utility in oracle is there any such utility available for Sybase. if so could you please share

  • Payment proposal exception

    we run F110 payment proposal, payment method: C, the proposal list shows "exception" with red light, but any steps how to find why it is "exception"? this open item is already overdue and no payment block

  • Statistic of the executions of the Query

    Hi people, I have to find out how many time my query was executed. I know there is a table: RSDDSTAT, but it shows me only one register and this query was already executed many times. Obs.: This query is based on ODS. Could you help me please and say