Reg: inserting values using procedures in odi

Hello

Hello everyone, I have a requirement like values are inserted into the table of DBMS using the odi procedure very.

I use this procedure in a package, this package including refresh variables so that it runs several times using County.

I'm trying to insert values into the table, the table is empty. so when I am trying to run this package I get error like

This

ODI-1228: Dailyfileloads task (procedure) insertion fails on the target of ORACLE DSS_ORACLE connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00917: Missing comma

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:338)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:263)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:822)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)

I'm not able to solve this please help me.

Code of procedure like this: insert into dailyload_apmstr (FILENAME) values (DSS. #sample);

Kind regards
Sri

Can you please close the thread marking the answers that help complete or correct

Tags: Business Intelligence

Similar Questions

  • Procedure with the DML statements that insert values from 1 to 100 in only one table and it is matching word equivalent in the other

    Can someone help me create a procedure with the DML statements that insert values from 1 to 100 in a table "abc" and the procedure must connect the numbers into words in another table "xyz" without doing a commit explicitly. "."

    Currently on trial...

    SQL > create table abc (num number);

    Table created.

    SQL > create table xyz (num varchar2 (100));

    Table created.

    SQL > ed
    A written file afiedt.buf

    1. insert all
    2 values of 1 = 1 then in abc (num) (l)
    3 when the values of 1 = 1 then in xyz (num) (to_char (to_date(l,'j'), 'jsp'))
    4 * Select the level from dual connect by level<=>
    SQL > /.

    200 rows created.

    And the result...

    SQL > select * from abc;

    NUM
    ----------
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ..
    ..
    ..
    98
    99
    100

    100 selected lines.

    SQL > select * from xyz;

    NUM
    ----------------------------------------------------------------------------------------------------
    one
    two
    three
    four
    five
    six
    seven
    eight
    nine
    ten
    Eleven
    twelve
    ..
    ..
    ..
    98
    Nineteen eighty
    Cent

    100 selected lines.

  • insertion of values using the impl class

    Hi am values inserting data by using the class impl, my problem is when I insert values, it shows that the values must be unique so it cannot be inserted, but when I check in the database, the values are inserted, it seems my loop trying to reinsert the same values twise, am in jdeveloper 11.1.1.6.0
        public Number addOrginisation(OrgDetails orgDetails){
            Number orgid =null;
    
               try{
                      
                      UAMAppModuleImpl am = (UAMAppModuleImpl)ADFUtils.getApplicationModuleForDataControl("UAMAppModuleDataControl1");
                      CreateUserBean cu = new  CreateUserBean();
                      String n = (String)orgDetails.getDpayment().getValue();
                       System.out.println(" n  :"+n );
                      String  newIdAssigned = cu.createAcc(n,orgDetails.getCadastreAccountBean() );
                      System.out.println(" newIdAssigned :"+ newIdAssigned  );
                    this.addmemebres(orgDetails.getAddmember(), orgDetails.getName());
    
    
    
                                    String otype = null;
                String osubtype = null;
            
            DCIteratorBinding it0 = ADFUtils.findIterator("UamOrganisationsView1Iterator");
                      if(it0 != null && it0.size() > 0){      
                         
                          for(Row r : it0.getAllRowsInRange() ){
                          EntityDefImpl accDef1 =UamOrganisationsImpl.getDefinitionObject();     
                          UamOrganisationsImpl org1 =  (UamOrganisationsImpl)accDef1.createInstance2(am.getDBTransaction(),null);
                         
                     
                      otype = (String)r.getAttribute("Organisationtypecode");
                      osubtype = (String)r.getAttribute("Orgsubtypecode"); 
                          org1.setOrganisationtypecode(otype);
                      System.out.println("onsertorgtype " + otype);
                          org1.setOrgsubtypecode(osubtype);
                      System.out.println("insertedsubtype " + osubtype);
                          
                         
                          org1.setCadastreaccount(newIdAssigned);
                          System.out.println("Addedcardaccount " + newIdAssigned);  
                              
                          org1.setOrganisationname(orgDetails.getName());
                          System.out.println("AddedOrganisation " + orgDetails.getName());    
                          org1.setCadastreaccount(newIdAssigned);
                          System.out.println("Addedcardaccount " + newIdAssigned);    
                          org1.setOrganisationemail(orgDetails.getEmail());
                          System.out.println("Addedemail " + orgDetails.getEmail());  
                          org1.setRegistrationnumber(orgDetails.getRegNumber());    
                          System.out.println("Registrationnumber " +orgDetails.getRegNumber());    
                          org1.setRegistrationstatus("Y");
                          org1.setStatus("Y"); 
                          orgid =  org1.getOrganisationid();
                          System.out.println("returnorgid " +orgid);
                          am.getDBTransaction().commit();  
                          System.out.println("after "+ orgid);  
                          orgid =  org.getOrganisationid();
                          
                         
                          
                      }
                          
                          
                      }
                String name = null;
                String surname = null;
                String identitynumber = null;
                String emailaddress = null;
                String contactnumber = null;
                String ownership = null;
                String accountofficer = null;
                Number officeid = null;
    
    
               DCIteratorBinding it = ADFUtils.findIterator("ocompanyofficerdetailsIterator");
                  if(it != null && it.size() >0){                              
                  for(Row r : it.getAllRowsInRange() ) {                                   
                        EntityDefImpl accDef2 =UamCompanyofficerdetailsImpl.getDefinitionObject(); 
                        UamCompanyofficerdetailsImpl comp = (UamCompanyofficerdetailsImpl)accDef2.createInstance2(am.getDBTransaction(),null);
                       
                        
                        name = (String)r.getAttribute("name");
                      System.out.println("offname" +name);
                        surname = (String)r.getAttribute("surname");
                      System.out.println("surnametest " +surname);
                        identitynumber = (String)r.getAttribute("dentitynumber");
                      System.out.println("idtest " +identitynumber);
                        emailaddress = (String)r.getAttribute("emailaddress");
                      System.out.println("emailtest" + emailaddress);
                        contactnumber = (String)r.getAttribute("contactnumber");
                        System.out.println("contatc" + contactnumber);
                        ownership = (String)r.getAttribute("ownership");
                      System.out.println("ownership " + ownership);
                        accountofficer = (String)r.getAttribute("accountingofficer");
                       System.out.println("accountoffice " + accountofficer);
                
                
               
               comp.setName(name);
                      System.out.println("offname " + name);
               comp.setSurname(surname);
                      System.out.println("surnameoff " +surname);
               comp.setIdentitynumber(identitynumber);
                      System.out.println("identitynumber " +identitynumber);
               comp.setEmailaddress(emailaddress);
                      System.out.println("emailaddresscomp " +emailaddress);
               comp.setContactnumber(contactnumber);
                      System.out.println("contactnumbercomp " + contactnumber);
               comp.setOwnership(ownership);
                      System.out.println("ownershipcomp " + ownership);
               comp.setAccountingofficer(accountofficer);
               System.out.println("accountofficer " +accountofficer);
                        officeid = comp.getOfficerid();
                               System.out.println("afterofficeid " + officeid);
                      comp.setOrganisationid(orgid);
                      am.getDBTransaction().commit();
                        System.out.println("***insetead companyofficials****" +  officeid ) ;
    
    
                    }
        }
           }catch(Exception e){
                System.out.println("after "+e.getMessage());
                e.printStackTrace();
            }
           
            return  orgid;
        }
    
    my log error is
    n  :CRC
    *****createAcc  Entity [oracle.jbo.Key[10891 ]]
    *****createAcc  UamCadastreaccounts
    @@@@@@@@@@@@CRC
    @@@@@@@@@@@@10892
     newIdAssigned :10892
    onsertorgtype PRIV 
    insertedsubtype LA
    Addedcardaccount 10892
    AddedOrganisation testnow
    Addedcardaccount 10892
    Addedemail [email protected]
    Registrationnumber 2332434
    returnorgid 2233
    after 2233
    onsertorgtype PRIV 
    insertedsubtype DEA
    Addedcardaccount 10892
    after JBO-ecadastre.gov.za.uam.model.entities.UamOrganisations_Rule_0: Organisation Name Must Be Unique
    oracle.jbo.AttrSetValException: JBO-ecadastre.gov.za.uam.model.entities.UamOrganisations_Rule_0: Organisation Name Must Be Unique
         at oracle.jbo.rules.RulesBeanUtils.createException(RulesBeanUtils.java:381)
         at oracle.jbo.rules.AbstractValidator.createException(AbstractValidator.java:1065)
         at oracle.jbo.rules.AbstractValidator.doRaiseException(AbstractValidator.java:1120)
         at oracle.jbo.rules.AbstractValidator.raiseException(AbstractValidator.java:1109)
         at oracle.jbo.rules.JboAbstractValidator.raiseException(JboAbstractValidator.java:409)
         at oracle.jbo.rules.AbstractValidator.raiseException(AbstractValidator.java:1096)
         at oracle.jbo.server.JboUniqueKeyValidator.validateValue(JboUniqueKeyValidator.java:369)
         at oracle.jbo.server.JboUniqueKeyValidator.validateValueWithContext(JboUniqueKeyValidator.java:84)
         at oracle.jbo.rules.JboAbstractValidator.callValidateValueWithContext(JboAbstractValidator.java:235)
         at oracle.jbo.rules.JboAbstractValidator.validate(JboAbstractValidator.java:386)
         at oracle.jbo.rules.RulesBeanUtils.validateObject(RulesBeanUtils.java:725)
         at oracle.jbo.rules.RulesBeanUtils.validate(RulesBeanUtils.java:696)
         at oracle.jbo.server.AttributeDefImpl.validate(AttributeDefImpl.java:3349)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:3294)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:2012)
         at ecadastre.gov.za.uam.model.entities.UamOrganisationsImpl.setOrganisationname(UamOrganisationsImpl.java:336)
         at uam.cadastre.gov.za.CreateOrganisationBean.addOrginisation(CreateOrganisationBean.java:213)
         at uam.cadastre.gov.za.OrgDetails.getNextStopPayment(OrgDetails.java:689)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
     oracle.jbo.server.ViewRowSetImpl@8f2102
     null
     null
     null
     null
     null
     null
     BDP
     CRA
     CRC
     DRO
     EFT
     OTC
    ************endpayment *********
     but am able to insert the organisation  values in database but it show me that Organisation Name Must Be Unique
    the for loop is re-entering the values again
    Published by: adf0994 on 01/15/2013 13:11

    Published by: adf0994 on 01/15/2013 13:12

    Hello

    a rule in the ADF is still working through the link layer (and that's what you start by before you can join the impl classes). When you have access to a DCIteratorBinding, you have access to the lines it holds. Of the DCIteratorBinding, you can get access to the RowSetIterator (getRowSetIterator()). Here you can now create new lines programmatically by calling

    -Row rw = rowSetIterator.createRow ();
    -fill in the attribute for line
    -rowSetIterator.insertRow (rw);

    You can also use this to simply update the existing lines. With the next commit, these changes will be persistent in the database.

    Frank

  • [Insert values in table with the output values of the procedure]

    Hello

    I wrote the following procedure

    <>PROCEDURE
    create or replace procedure experience is
    cursor curexp is e.employee_id, trunc (months_between (jh.end_date, jh.start_date)) select exp, e.first_name, e.last_name, d.department_name, l.city, c.country_name, l.street_address
    e employees, job_history jh, departments d, places the country c
    where e.employee_id = jh.employee_id
    and e.department_id = d.department_id
    and d.location_id = l.location_id
    and l.country_id = c.country_id;

    v_result curexp % rowtype;

    Start
    Open curexp;
    loop
    extract the curexp in v_result;
    When the output curexp % notfound;
    dbms_output.put_line (v_result.employee_id |) ' '|| v_result.exp | ' '|| v_result.first_name | v_result.last_name);
    end loop;
    end;
    < / procedure >

    to get the values as below
    < output >
    101 NeenaKochhar 49
    101 NeenaKochhar 40
    102 66 LexDe Haan
    114 DenRaphaely 21
    122 PayamKaufling 11
    176 helenethibaut 9
    176 helenethibaut 11
    200 JenniferWhalen 69
    200 JenniferWhalen 53
    201 MichaelHartstein 46
    < / output >
    After that, I created a table as below
    < table >
    create table exp_recored (employee_id number, number of exp_mon, name varchar2 (20))
    < /table >
    Now I want to insert values in the table above

    I tried like below
    < Insert >
    Start
    insert into exp_recored (employe_id, exp_mon, name) values (experience);
    end;
    < / insetr >
    but I got error like below

    PL/SQL: ORA-00947: not enough values

    Could someone tell me please on the above point

    Thank you
    Thelak

    thelakbe wrote:
    Hello

    I tried too

    During this operation
    Start
    insert into exp_recored (employe_id, exp_mon, name) values (v_result.employee_id, v_result.exp, v_result.first_name | v_result.last_name);
    end;

    I got the below error

    PL/SQL: ORA-00984: column not allowed here

    You can try this?

    CREATE OR REPLACE
    PROCEDURE experience
    IS
      CURSOR curexp
      IS
        SELECT e.employee_id,
          TRUNC(months_between(jh.end_date,jh.start_date)) exp,
          e.first_name,
          e.last_name,
          d.department_name,
          l.city,
          c.country_name,
          l.street_address
        FROM employees e,
          job_history jh,
          departments d,
          locations l,
          countries c
        WHERE e.employee_id=jh.employee_id
        AND e.department_id=d.department_id
        AND d.location_id  =l.location_id
        AND l.country_id   =c.country_id;
      v_result curexp%rowtype;
    BEGIN
      OPEN curexp;
      LOOP
        FETCH CUREXP INTO V_RESULT;
        EXIT WHEN CUREXP% NOTFOUND;
    
        INSERT INTO EXP_RECORED (EMPLOYEE_ID,EXP_MON,NAME)
        VALUES (V_RESULT.EMPLOYEE_ID,V_RESULT.EXP,V_RESULT.FIRST_NAME||V_RESULT.LAST_NAME);
      END LOOP;
    
      COMMIT;
    END;
    
  • Data recovery before the insert in the procedure

    Hello
    I'm new in plsql programming and I'd like to do a procedure. I have tables like the following table1:

    | COL1 | COL2. COL3 | COL4 | COL5 | COL6 | COL7 |
    | 600. 140. 2. 10. 1300 | 500 | 1.
    | 600. 140. 2. 20. 1400 | 340. 4.
    | 600. 140. 2. 15. 1400 | 230. 3.
    | 600. 140. 2. 35. 1700 | 120. 2.
    | 600. 150. 3. 10. 1300 | 166. 6.
    | 600. 150. 3. 15. 1400 | 435. 5.

    For the same COL1 and COL2/COL3, check out the selection of different values of COL4
    For example, for COL1 = 600, COL2 = COL3/140 = 2 and COL2 = COL3/150 = 3
    Return not common 20 and 35 as values


    Then insert the rows in this table TABLE1
    600, 150, 3, 20, 1400, 340, 7
    600, 150, 3, 35, 1700, 120, 8


    I'm doing the procedure as below but I have problem how to recover data in the insert statement

    PROCEDURE COPY_COLUMNS  ( P_COL1        IN  A.COL1%TYPE,
                              P_FROM_COL2   IN  B.COL2%TYPE,
                              P_FROM_COL3   IN  B.COL3%TYPE,
                              P_TO_COL2     IN  B.COL2%TYPE,
                              P_TO_COL3     IN  B.COL3%TYPE,
                              P_FLG1        IN  VARCHAR2,
                              P_FLG2        IN  VARCHAR2,
                              P_FLG3        IN  VARCHAR2                                      
                                         ) IS
    
    CURSOR CFL1 IS select COL4
        FROM TABLE1
        WHERE COL1 = P_COL1 AND COL2 = P_FROM_COL2 AND COL3 = P_FROM_COL3
        MINUS
        select COL4
        FROM TABLE1
        WHERE COL1 = P_COL1 AND COL2 = P_TO_COL2 AND COL3 = P_TO_COL3;
    
    
    CURSOR CFL2 IS select COL4
        FROM TABLE2
        WHERE COL1 = P_COL1 AND COL2 = P_FROM_COL2 AND COL3 = P_FROM_COL3
        MINUS
        select COL4
        FROM TABLE2
        WHERE COL1 = P_COL1 AND COL2 = P_TO_COL2 AND COL3 = P_TO_COL3;
    
    
    CURSOR CFL3 IS select COL4
        FROM TABLE3
        WHERE COL1 = P_COL1 AND COL2 = P_FROM_COL2 AND COL3 = P_FROM_COL3
        MINUS
        select COL4
        FROM TABLE3
        WHERE COL1 = P_COL1 AND COL2 = P_TO_COL2 AND COL3 = P_TO_COL3;  
    
    
    V_REC        CFL1%ROWTYPE;
    
    
    BEGIN
    
    
    IF P_FLG1='N' OR P_FLG2='N' OR P_FLG3='N' THEN
        GOTO label; --do nothing
    END IF;
    
    
    IF P_FLG1 = 'Y' THEN
    
        OPEN CFL1;
        FETCH CFL1 INTO V_REC;
        CLOSE C1;
    
    --    SELECT COL5, COL6
    --    FROM TABLE1
    --    WHERE COL1 = P_COL1 AND COL2 = P_FROM_COL2 AND COL3 = P_FROM_COL3 AND COL4 = V_REC.COL4;
    
    
        FOR REC IN CFL1 LOOP
            INSERT INTO TABLE1 
                SELECT P_COL1, P_TO_COL2, P_TO_COL3, CFL1.COL4, -- COL5 ?? , COL6 ?? -- , SEQname2.NEXTVAL) 
    
    
        END LOOP;
    
    END IF;
    
    <<label>>
    END;
    

    Could you help me please do so?
    Thanks in advance

    And if you want to insert the missing values COL4 both sense, use of full join, as I've already shown (slightly modified):

    SQL > insert
    2 in table1
    3 values (600,150,3,70,1500,567,8)
    4.

    1 line of creation.

    SQL > insert
    2 in table1
    3 values (600,150,3,90,1900,789,9)
    4.

    1 line of creation.

    SQL > select *.
    2 from table1
    3.

    COL1 COL2 COL3 COL4 COL5 COL6 COL7
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    600 140 2 10 1300 500 1
    600 140 2 20 1400 340 4
    600 140 2 15 1400 230 3
    600 140 2 35 1700 120 2
    600 150 3 10 1300 166 6
    600 150 3 15 1400 435 5
    600 150 3 70 1500 567 8
    600 150 3 90 1900 789 9

    8 selected lines.

    SQL > insert
    2 in table1
    3 with t1 as)
    4 Select
    5 from table1
    6 where col1 =: P_COL1
    7 and col2 =: P_FROM_COL2
    8 and col3 =: P_FROM_COL3
    9 and: P_FLG1 = 'Y '.
    10              ),
    11 t2 as)
    12. Select *.
    13 from table1
    14 where col1 =: P_COL1
    15 and col2 =: P_TO_COL2
    16 and col3 =: P_TO_COL3
    17 and: P_FLG1 = 'Y '.
    18              )
    19 select: P_COL1 col1,.
    nvl2(t1.col4,:P_TO_COL2,:P_FROM_COL2) 20 col2,
    nvl2(t1.col4,:P_TO_COL3,:P_FROM_COL3) 21 col3,
    22 nvl (t1.col4, t2.col4) col4,
    NULL, 23
    NULL, 24
    25 null
    26 of t1
    join full 27
    28                t2
    29 on t2.col4 = t1.col4
    30 where the t1.col4 is null
    31 or t2.col4 is null
    32.

    4 lines were created.

    SQL > select *.
    2 from table1
    3.

    COL1 COL2 COL3 COL4 COL5 COL6 COL7
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    600 140 2 10 1300 500 1
    600 140 2 20 1400 340 4
    600 140 2 15 1400 230 3
    600 140 2 35 1700 120 2
    600 150 3 10 1300 166 6
    600 150 3 15 1400 435 5
    600 150 3 70 1500 567 8
    600 150 3 90 1900 789 9
    600 140 2 70
    600 140 2 90
    600 150 3 35

    COL1 COL2 COL3 COL4 COL5 COL6 COL7
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    600 150 3 20

    12 selected lines.

    SQL >

    SY.

  • RESTful service cannot insert data using PL/SQL.

    Hi all
    Spin: stand-alone 2.01 AL on OEL 4.8 in box a. VM
    Database Oracle 10.2.0.4 with Apex 4.2.0.00.27 on OEL4.8 in the VM B box.

    Measure of oracle.example.hr performed without problem Restful services.

    Cannot insert data using AL 2.0.1 but works on 1.1.4 AL.
    who uses the following table (under scheme: scott):
     
    create table json_demo ( title varchar2(20), description varchar2(1000) ); 
    grant all on json_demo to apex_public_user; 
    and procedure (scott diagram) below:
    CREATE OR REPLACE
    PROCEDURE post(
        p_url     IN VARCHAR2,
        p_message IN VARCHAR2,
        p_response OUT VARCHAR2)
    IS
      l_end_loop BOOLEAN := false;
      l_http_req utl_http.req;
      l_http_resp utl_http.resp;
      l_buffer CLOB;
      l_data       VARCHAR2(20000);  
      C_USER_AGENT CONSTANT VARCHAR2(4000) := 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
    BEGIN
      -- source: http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
      -- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
      -- rather than just returning the text of the error page.
      utl_http.set_response_error_check(false);
      -- Begin the post request
      l_http_req := utl_http.begin_request (p_url, 'POST', utl_http.HTTP_VERSION_1_1);
      -- Set the HTTP request headers
      utl_http.set_header(l_http_req, 'User-Agent', C_USER_AGENT);
      utl_http.set_header(l_http_req, 'content-type', 'application/json;charset=UTF-8');
      utl_http.set_header(l_http_req, 'content-length', LENGTH(p_message));
      -- Write the data to the body of the HTTP request
      utl_http.write_text(l_http_req, p_message);
      -- Process the request and get the response.
      l_http_resp := utl_http.get_response (l_http_req);
      dbms_output.put_line ('status code: ' || l_http_resp.status_code);
      dbms_output.put_line ('reason phrase: ' || l_http_resp.reason_phrase);
      LOOP
        EXIT
      WHEN l_end_loop;
        BEGIN
          utl_http.read_line(l_http_resp, l_buffer, true);
          IF(l_buffer IS NOT NULL AND (LENGTH(l_buffer)>0)) THEN
            l_data    := l_data||l_buffer;
          END IF;
        EXCEPTION
        WHEN utl_http.end_of_body THEN
          l_end_loop := true;
        END;
      END LOOP;
      dbms_output.put_line(l_data);
      p_response:= l_data;
      -- Look for client-side error and report it.
      IF (l_http_resp.status_code >= 400) AND (l_http_resp.status_code <= 499) THEN
        dbms_output.put_line('Check the URL.');
        utl_http.end_response(l_http_resp);
        -- Look for server-side error and report it.
      elsif (l_http_resp.status_code >= 500) AND (l_http_resp.status_code <= 599) THEN
        dbms_output.put_line('Check if the Web site is up.');
        utl_http.end_response(l_http_resp);
        RETURN;
      END IF;
      utl_http.end_response (l_http_resp);
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line (sqlerrm);
      raise;
    END;
    and execution in sqldeveloper 3.2.20.09 when it connects directly to box B as scott:
     
    SET serveroutput ON
    DECLARE
      l_url      VARCHAR2(200)   :='http://MY_IP:8585/apex/demo';
      l_json     VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
      l_response VARCHAR2(30000);
    BEGIN
      post( p_url => l_url, p_message =>l_json, p_response => l_response);
    END;
    leading to:
     
    anonymous block completed 
    status code: 200
    reason phrase: OK 
    with data inserted. 
    Installation using 2.0.1
       Workspace : wsdemo
     RESTful Service Module:  demo/
              URI Template:      test
                    Method:  POST
               Source Type:  PL/SQL
    and execution in sqldeveloper 3.2.20.09 when it connects directly to box B as scott:
     
    SET serveroutput ON
    DECLARE
      l_url      VARCHAR2(200)   :='http://MY_IP:8585//apex/wsdemo/demo/test';
      l_json     VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
      l_response VARCHAR2(30000);
    BEGIN
      post( p_url => l_url, p_message =>l_json, p_response => l_response);
    END;
    leading to:
     
    status code: 500 
    reason phrase: Internal Server Error 
    
    Listener's log: 
    Request Path passes syntax validation
    Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=WSDEMO, _failed=false, _lastUpdate=1364313600000, _template=/wsdemo/, _type=BASE_PATH]
    Applied database connection info
    Attempting to process with PL/SQL Gateway
    Not processed as PL/SQL Gateway request
    Attempting to process as a RESTful Service
    demo/test matches: demo/test score: 0
    Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    Tenant Principal already established, cannot dispatch
    Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: POST demo/test
    demo/test is a public resource
    Using generator: oracle.dbtools.rt.plsql.AnonymousBlockGenerator
    Performing JDBC request as: SCOTT
    Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
    INFO: Error occurred during execution of: [CALL, begin
     insert into scott.json_demo values(/*in:title*/?,/*in:description*/?);
    end;, [title, in, class oracle.dbtools.common.stmt.UnknownParameterType], [description, in, class oracle.dbtools.common.stmt.UnknownParameterType]]with values: [thetitle, thedescription]
    Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
    INFO: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    
    java.sql.SQLException: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
            at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
            at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
            at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
            at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
            at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
            at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
            at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
            at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:242)
            at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
            at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:101)
            at $Proxy46.execute(Unknown Source)
            at oracle.dbtools.common.jdbc.JDBCCallImpl.execute(JDBCCallImpl.java:44)
            at oracle.dbtools.rt.plsql.AnonymousBlockGenerator.generate(AnonymousBlockGenerator.java:176)
            at oracle.dbtools.rt.resource.templates.v2.ResourceTemplatesDispatcher$HttpResourceGenerator.response(ResourceTemplatesDispatcher.java:309)
            at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:88)
            at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:412)
            at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
            at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:999)
            at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
            at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:65)
            at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
            at java.lang.Thread.run(Thread.java:662)
    Error during evaluation of resource template: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    Please notify.
    Concerning
    Zack

    Zack.L wrote:
    Hi Andy,.

    Sorry, I forgot to post the Source that is used by the AL1.1.4 and the AL2.0.1.

    Source

    begin
    insert into scott.json_demo values(:title,:description);
    end;
    

    It is a failure during insertion?
    Yes, he failed in the insert using AL2.0.1.

    If the above statement produces the following error message:

    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
     
    

    That gives me to think that a character is not printable (notice how there is anything between the quotation marks - "") worked his way in your PL/SQL Manager. Note how the error is reported to correspond to a column 74 on line 2, line 2 of the block above has 58 characters, so a pure assumption somehow, there is extra space on line 2, which confuses the PL/SQL compiler, I suggest retype PL/SQL Manager manually and see if that solves the problem.

  • How PLSQL functions/procedures by ODI dynamically

    I want to know is there a way to create functions or procedures on the Oracle database through procedures ODI dynamically.
    These are functions that I need to dynamically create by the ODI process so that when the procedure runs the following function is created at the database level.

    FUNCTION to CREATE or REPLACE MY2DATE (p_str IN VARCHAR2
    format_picture IN VARCHAR2
    )
    DATE OF RETURN
    IS
    BEGIN
    RETURN TO_DATE (p_str, format_picture);
    EXCEPTION
    WHILE OTHERS
    THEN
    RETURNS A NULL VALUE.
    END;
    /


    Any help appreciated

    Hello

    Create an ODI procedure and co-pilot on target, select

    Technologies: Oracle
    Logical schema:

    Command:

    FUNCTION to CREATE or REPLACE MY2DATE (p_str IN VARCHAR2, format_picture IN VARCHAR2)
    DATE OF RETURN
    IS
    BEGIN
    RETURN TO_DATE (p_str, format_picture);
    EXCEPTION
    WHILE OTHERS
    THEN
    RETURNS A NULL VALUE.
    END;

    ODI will create it in the backend.

    ARY: http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi

    Thank you
    Guru

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • How to insert values of array of String in BPM

    Hello

    I have defined an array of strings in the business object, created a data object and want to fill/insert values inside. I searched a lot of messages and tried several options but no luck.

    My BO:

    " < xs: Schema targetNamespace = ' http://xmlns.Oracle.com/BPM/bpmobject/TestTypes/SimpleArrayBO "elementFormDefault ="qualified"xmlns =" http://xmlns.Oracle.com/BPM/bpmobject/TestTypes/SimpleArrayBO "" xmlns: XS = " http://www.w3.org/2001/XMLSchema " xmlns:bpmo =" http://xmlns.Oracle.com/BPM/bpmobject/ " > ""

    < name XS: complexType = "SimpleArrayBOType" >

    < xs: SEQUENCE >

    < name XS: ELEMENT = "attr1" nillable = "true" type = "xs: String" maxOccurs = "unbounded" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < xs: element name = "SimpleArrayBO" type = "SimpleArrayBOType" / >

    < / xs: Schema >

    Add a script task and tried different ways to fill in the values.

    Basic ['a', 'b'] also fails with the error expected "-result tree fragment" rather than "string".

    How to manually enter the values?

    Thank you

    Chandra

    Because your input is coming from a few strings and not a table, you can just add a Script activity to your process and to define table of your target XSD using XML.

    To do this, you must add a Script to the activity-> in the "Application" tab click on 'Data Associations'-> dragging the "Expression" icon above your target object on the right side (not the table but the table parent)-> open the XPath expression box in the Middle-> click 'XPath Exp' in the drop-down list at the top.

    I used your XSD to create the XML file for the logic below:

    oraext:ParseXml (concat ('))

    http://www.w3.org/2001/XMLSchema-instance '.

    "" xsi: schemaLocation = "http://xmlns.oracle.com/bpm/bpmobject/TestTypes/SimpleArrayBO xsd/mySimpleArray.xsd.

    xmlns ="http://xmlns.oracle.com/bpm/bpmobject/TestTypes/SimpleArrayBO" >. "

    ', bpmn:getDataObject('string1') '

    ', bpmn:getDataObject('string2') '

    '))

    When I 'bpmn:getDataObject('...')', you should rather to insert your data object variables both your process chain.

    Hope it gets you going,

    Dan

  • Dynamic insertion within the procedure error


    Hi all

    I use under oracle database on HP - UX.

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE Production 10.2.0.5.0
    AMT for HP - UX: 10.2.0.5.0 - Production Version
    NLSRTL Version 10.2.0.5.0 - Production

    I'm not able to run the procedure below and it returns the error. The insert in the procedure returns error. If I execute manually only the insert statement, it works well.
    Can someone help me with this issue?

    Procedure
    ===========
    create or replace procedure test_proc
    as
    v_sql varchar2 (2000);
    Start
    v_sql: =' insert into TABLE1 (select owner, object_type, object_name, "S", "Y" of dba_objects@LINK1 )
    where owner = "ABC" and object_type = "TABLE" less
    Select the owner, object_type, object_name, "S", "Y" from dba_objects where owner = "ABC" and object_type = "TABLE") ';

    immediately run v_sql;
    commit;
    end;
    /

    exec test_proc;

    Error:
    ===========

    ERROR on line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYSTEM. TEST_PROC", line 8
    ORA-06512: at line 1

    user running this procedure doesn't have permission to read data from DBA_OBJECTS. Grant select permission on that to the user running this procedure and it should work.

    Onkar

  • table name not valid error when inserting values into a table

    I use the following statement to insert values into a table:

    curs. Execute ("INSERT INTO _ * '%s' * _ VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(*table_name*,file_extension)) ")

    whence table_name the following statement

    table_name = ' config.staging_db_tablesNames ['in_msgs]

    as I created a configuration file for all parameters that can change. The value of the table in the audit using a print command is correctly, but when put in the query above to run the insert statement gives an error. The following is the summary of comprehensive performance where you can see the table name as

    $ python gsapscnr.py
    Vote for the data files in/home/mh/inbox /...

    GSAP_MSG_IN
    Traceback (most recent call changed):
    File "gsapscnr.py", line 147, in it?
    poll_for_data()
    File "gsapscnr.py", line 86, in poll_for_data
    Sorter = load_details_first)
    File "gsapscnr.py", line 42, survey
    curs. Execute ("INSERT INTO '%s' VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(table_name,file_extension)) ")
    cx_Oracle.DatabaseError: ORA-00903: invalid table name

    Can anyone help with this problem please. I'm passing the value of the table in a bad way. Also if anyone can suggest a good tutorial for paythong programming using cx_Oracle.

    Concerning

    Print the SQL string that you establish, cut and paste it this output in SQL * more and see if it runs. This may show you that you should remove the single quotes around the name of the table %s in the Python file.

  • make exception in the cache server when inserting values about 80 000

    Hi I am trying to insert values from 80,000 in the cache in distributed mode (2 nodes) of the .NET client and then get error in side .net client below.

    TcpConnection (Id = 0x00000132F5B02F87AC190D2F6F41225F9F53C4584B06C624C3DCB23A6B005B41, Open = True, Member (Location = machine: machineName, process:Test.OC.vshost, Role = customer RTC .NET), LocalAddress = 10.2.11.17:56409, RemoteAddress = 172.25.11.44:9099): closed channel



    *, but I get the below exception in browser cache *.

    com.tangosol.net.RequestPolicyException: there is no node storage extension for the DistributedCache service
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Binar
    yMap.onMissingStorage(PartitionedCache.CDB:27)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Binar
    yMap.ensureRequestTarget(PartitionedCache.CDB:42)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Binar
    yMap.sendPartitionedRequest(PartitionedCache.CDB:31)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Binar
    yMap.size(PartitionedCache.CDB:15)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Binar
    yMap$ EntrySet.size (PartitionedCache.CDB:1)
    to com.tangosol.util.ConverterCollections$ ConverterEntrySet.size (ConverterCollections.java:2906)
    at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:741)
    at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:37)
    at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.tangosol.net.CacheFactory.main(CacheFactory.java:827)

    and the error in the server window hide below

    2011-10-11 12:03:45.056/1052.657 Oracle coherence GE 3.7.0.0 < error > (thread = DistributedCache, 3 = member): Musicshe closing
    onedCache due to an unhandled exception: means
    2011-10-11 12:03:45.056/1052.657 Oracle coherence GE 3.7.0.0 < error > (thread = DistributedCache, 3 = member):
    means: limit superior GC exceeded
    at com.tangosol.io.AbstractByteArrayReadBuffer.instantiateBufferInput(AbstractByteArrayReadBuffer.java:182)
    at com.tangosol.io.AbstractReadBuffer.getBufferInput(AbstractReadBuffer.java:32)
    at com.tangosol.util.ExternalizableHelper.extractIntDecoration(ExternalizableHelper.java:4575)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.getKeyPartition (left
    ionedService.CDB:10)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Stora
    ge.onBackingMapEvent(PartitionedCache.CDB:6)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Stora
    GE$ PrimaryListener.entryInserted (PartitionedCache.CDB:1)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
    at com.tangosol.net.cache.OldCache.dispatchEvent(OldCache.java:1938)
    to com.tangosol.net.cache.OldCache$ Entry.onAdd (OldCache.java:2007)
    at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
    at com.tangosol.net.cache.OldCache.put(OldCache.java:262)
    at com.tangosol.net.cache.OldCache.put(OldCache.java:230)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Stora
    ge.putPrimaryResource(PartitionedCache.CDB:27)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Stora
    ge.moveResourcesToPrimary(PartitionedCache.CDB:37)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ Stora
    ge.movePartition(PartitionedCache.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.moveP
    artition(PartitionedCache.CDB:14)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.assignPrimaryPartition
    (PartitionedService.CDB:41)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.restoreOrphans (Musicshe
    onedService.CDB:38)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onOwnershipRequest (by
    titionedService.CDB:11)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$ OwnershipRequest.onRec
    eived(PartitionedService.CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify (PartitionedSe
    PSMA. CDB:3)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNot
    IFY(PartitionedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    2011-10-11 12:03:45.056/1052.657 Oracle coherence GE 3.7.0.0 < D5 > (thread = DistributedCache, 3 = member): Service DistributedCac
    He left the band
    2011-10-11 12:03:47.524/1055.125 Oracle coherence GE 3.7.0.0 < Info > (thread = main Member, = 3): Restarting Service: DistributedC
    ache
    2011-10-11 12:03:47.524/1055.125 Oracle coherence GE 3.7.0.0 < D5 > (thread = DistributedCache, 3 = member): Service DistributedCac
    He joined the cluster with the senior members of the service 2
    2011-10-11 12:07:35.850/1283.451 Oracle coherence GE 3.7.0.0 < Info > (thread = Proxy: ExtendTcpProxyService:TcpAcceptorWorker:1,)
    Members = 3): restart NamedCache: Index
    2011-10-11 12:07:36.616/1284.217 Oracle coherence GE 3.7.0.0 < Info > (thread = Proxy: ExtendTcpProxyService:TcpAcceptorWorker:3,)
    Members = 3): restart NamedCache: security
    2011-10-11 12:58:26.732/4334.333 Oracle coherence GE 3.7.0.0 < error > (thread = Proxy: ExtendTcpProxyService:TcpAcceptor members =)
    (3): ending TcpAcceptor due to an unhandled exception: means
    Exception in thread "Proxy: ExtendTcpProxyService:TcpAcceptor" means: limit superior GC exceeded
    Logger: means: limit superior GC exceeded
    means: limit superior GC exceeded
    Logger: means: limit superior GC exceeded
    Exception in thread "main" means: limit superior GC exceeded
    means: limit superior GC exceeded
    2011-10-11 12:58:31.419/4339.020 Oracle coherence GE 3.7.0.0 < error > (thread = Proxy: ExtendTcpProxyService:TcpAcceptor:TcpProce)
    UPTAKE, member = 3): TcpAcceptor ending because of an exception not handled: means
    Exception in thread "DistributedCache:AspNetSessionCache | SERVICE_STOPPED"means: GC limited general excee
    DED
    Logger: means: limit superior GC exceeded



    ... pls help me

    Thanks in advance.

    So I guess you're a .net developer and you have never done any Java development?

    If you use the consistency you really know about Java or find someone who does to take care of your clusters. When you start to use the consistency for real many of the questions will require someone who knows how to debug a Java process, thread dumps, dumps, heap GC newspapers etc to work.

    To you the current issue - how you start hide you server JVM process are? You have a .bat file or .cmd - is one that comes with the download of consistency? Once we know, we can tell you how to change the heap.

    JK

  • Insert values over a select query

    Hi all, I have a simple question:
    I need to insert values into a table of two select statements.

    There is what I need to accomplish:
    I need monitor cursors open on a database, so:
    I created the following table:
    O_CURSORS
    Cols: TOTAL (number 5), the USER (VARCHAR2 (20), DATE (TIMESTAMP)
    I think that some queries like the following should work, but unfortunately, this isn't.
    insert into O_CURSORS (total,user,date)
    values (
    (select a.value, s.username from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'session cursor cache count'),
    (select sysdate from dual)
    )
    This statement does not work, the message is
    "Not enough values.
    If I modify as follows the declaration, it works fine
    insert into O_CURSORS (total,user)
    (
    (select a.value, s.username from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'session cursor cache count'),
    )
    Any advice would be much appreciated!

    Thanks in advance.

    You must not select sysdate double; It can be a part of any select statement. Simply include sysdate in your first query:

    INSERT INTO O_CURSORS (total,user,date)
    SELECT a.value, s.username, SYSDATE
    FROM v$sesstat a,  v$statname b,   v$session s
    WHERE a.statistic# = b.statistic#
      AND s.sid=a.sid and b.name = 'session cursor cache count'
    

    You will also notice that I elimiated keyword VALUES and just use a SQL statement to satisfy the INSERT statement.

    Published by: user13640471 on February 21, 2011 13:17

    Published by: user13640471 on February 21, 2011 13:18

  • API to insert values into the table of apps

    Hello

    I created a table with front end applications. Creating columns and rows. Now, I want to insert values in different columns of the corresponding lines.
    Can you get it someone please let me know the API that I can use here to insert the column values?

    Kind regards!

    If you want to insert data in the standard table oracle, then you must use the api instead, then apply the insert statement, this api oracle used to check the validation of the company etc.

    Regarding the concern with regard to insert the date as you said, this is why you should use this api 'PAY_USER_COLUMN_INSTANCE_API' to insert data in pl/sql script.

  • How to accept multiple input values using plsql

    I am in a process of design of a small tool. The tool must accept several input values. I know that this can be done using sql.
    But nothing, I can enter multiple values using the loop in the loop would be carried out according to the number of times a user wants to enter the values.

    It is also very good, if I can accept all the values at once and some how to analyze!
    SQL> set serverout on
    SQL> accept strings prompt 'input strings (comma separated):'
    input strings (comma separated):abcd,xyz,massimo,this,is,a,string
    SQL> declare
      2  s varchar2(32000):='&strings';
      3  begin
      4    for r in (select regexp_substr(s,'[^,]+',1,level) str
      5                from dual
      6              connect by level <= length(s)-length(replace(s,',',''))+1) loop
      7        dbms_output.put_line(r.str);
      8    end loop;
      9  end;
     10  /
    old   2: s varchar2(32000):='&strings';
    new   2: s varchar2(32000):='abcd,xyz,massimo,this,is,a,string';
    abcd
    xyz
    massimo
    this
    is
    a
    string
    
    PL/SQL procedure successfully completed.
    

    Max
    http://oracleitalia.WordPress.com

Maybe you are looking for

  • Re: Satellite L350 - always activate the NumLock?

    Every time when I started my laptop L350 I set NumLock to use my keyboard. Is it not talkative that the laptop don't forget the numlock on every time parameter that I started it upward? I hope that the users of the forum can help me, Brian

  • Get re-configured WAG160N on Win 7 64 bit computer

    I had no problem with my WAG160N when you use a computer for Win XP 32 bit fast but after the failure of its motherboard, I decided to replace it with a new Win 7 64 bit system.  But I now find that if the WAG160N still works ok I can't re - install

  • HP Officejet 4622: no connection USB with Officejet 4622

    After you have installed the Officejet 4622 (in accordance with the instructions, connected to a PC USB) it has been used over WiFi only for about a year. A few days ago, I got the ADSL modem replaced and want to connect the printer to the wireless n

  • Problem blackBerry App ID BB

    I had a BB Id with an email, I used it to get the bb world applications, then made a new ID from bb with a different electronics so I forgot my password. I can access my id on my pc but unable to download apps on my feature request coz of b device th

  • Cisco 2600 router as an IPSec client

    Hello Currently I use a Cisco VPN client software to connect to a remote server for IPSec on the workstations. I want to set up the IPSec client on Cisco 2600 router that connects to the remote server IPSec so that workstations can access subnet VPN