question by inserting values shuttle

Hello

I created two shuttles in one page, and I want to insert values into a table.

The following code works in my pl/sql testing and she correctly inserted 4 records.

port_account_id Username
8 name1
24 name1
8 name2
name2 24

But, when I put them in the code at the APEX, it gives an error. It introduced the 4 reviews as in PL/SQL, but it also tries to insert more than one extra record by inserting * 08:24 * to my domain PORT_ACCOUNT_ID and name1:name2 in the user name field.

As a result, I get an error: ORA-20507: numeric value invalid 08:24 for the PORT_ACCOUNT_ID column

Can someone advise please any problem see you here?

Thank you!
LC


DECLARE
l_selected_account apex_application_global. VC_ARR2;
l_selected_username apex_application_global. VC_ARR2;


BEGIN
l_selected_account: = APEX_UTIL. STRING_TO_TABLE (8:24 '); --(:P3_PORT_ACCOUNT_ID);
l_selected_username: = APEX_UTIL. STRING_TO_TABLE ("name1:name2"); --(:P3_USERNAME);

FOR 1.l_selected_username.count U in LOOP
FOR 1.l_selected_account.count A IN LOOP
-dbms_output.put_line (l_selected_username (U) |) "account: ' |" l_selected_account (A));
INSERT INTO PTCS_BUDGET_CONFIRM
(PORT_BUDGET_CONFIRM_ID, USERNAME, PORT_ACCOUNT_ID, EMAIL_DATE)
(Select PTCS_BUDGET_CONFIRM_SEQ.nextval, l_selected_username (U), l_selected_account (A), sysdate
Double);
END LOOP;
END LOOP;


END;

Is it possible that you have another process (processing of automatic line) who performs the additional insert?

Tags: Database

Similar Questions

  • 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

  • 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

  • Error inserting value into the database

    Hi am error when inserting value by clciking the button

    will have this error ORA-01722: invalid number

    got my trigger when button pressed

    IF: SYSTEM. FORM_STATUS = "MODIFIED" THEN

    -Save the changes if necessary

    DO_KEY ('COMMIT_FORM');

    END IF;

    am fit 11 GR 2

    Hello TerryJones

    After the error, simply press CTRL + SHIFT + E keyboard, and you will see where the problem lies.

    Hope this helps

    Hamid

  • 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.

  • 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

  • ORA-01401: inserted value too large for column

    I have a table.the structure is as below.

    SQL > desc IDSSTG. FAC_CERT;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    FAC_CERT_SK NOT NULL NUMBER (38)

    LOB_BYTE_CD_SK NUMBER (38)

    SRC_CRDTL_ID_STRNG VARCHAR2 (20)

    PROV_CRDTL_SK NOT NULL NUMBER (38)

    LAB_SPCL_TYP_CD_SK NUMBER (38)

    FAC_CERT_ID NOT NULL VARCHAR2 (20)

    DATE OF FAC_CERT_EFF_DT

    FAC_CERT_EFF_DT_TXT NOT NULL VARCHAR2 (10)

    DATE OF FAC_CERT_END_DT

    FAC_CERT_END_DT_TXT VARCHAR2 (10)

    UPDT_DT                                            DATE

    UPDT_DT_TXT VARCHAR2 (10)

    SS_CD NOT NULL VARCHAR2 (10)

    ODS_INSRT_DT NOT NULL DATE

    ODS_UPDT_DT NOT NULL DATE

    CREAT_RUN_CYC_EXEC_SK NOT NULL NUMBER (38)

    LST_UPDT_RUN_CYC_EXEC_SK NOT NULL NUMBER (38)

    LAB_SPCL_TYP_CD VARCHAR2 (10)

    LOB_BYTE_CD VARCHAR2 (10)

    BUS_PRDCT_CD VARCHAR2 (20)

    I need set the value of a column to a default value.

    SQL > alter table IDSSTG. FAC_CERT change (FAC_CERT_EFF_DT_TXT default, TO_DATE('01010001','MMDDYYYY'));

    ALTER table IDSSTG. FAC_CERT change (FAC_CERT_EFF_DT_TXT default, TO_DATE('01010001','MMDDYYYY'))

    *

    ERROR on line 1:

    ORA-01401: inserted value too large for column

    Please notify.

    Kind regards

    VN

    ALTER table IDSSTG. FAC_CERT change (default FAC_CERT_EFF_DT_TXT ' 01010001');

  • 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.

  • [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;
    
  • 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

  • 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.

  • insert value if pop up of master table

    Hi friends,

    can I insert value into the main table while pop up

    for example. If I add a new user and insert personal information from the user when I select user state then I can not find corressponding city so at this point I want to add the city to the corressponding state using pop-up.

    How is this Possible.

    Hello

    I used STATE_CODE for my section of the State. For page 2, page 3 (popup) and P2_STATE_CODE, it's P3_STATE_CODE. The page 3 is in fact based on a select list of:

    SELECT STATE_NAME d, STATE_CODE r
    FROM STATES
    ORDER BY 1
    

    but as it is an element "display text (" based LOV, saved state), you will see the State indicated on page 2.

    The value of P3_STATE_CODE is passed in the call to javascript:

    function callNewCityPopup ()
    {
     var statecode = document.getElementById('P2_STATE_CODE').value;
     var url;
     url = 'f?p=&APP_ID.:3:&APP_SESSION.::::P3_STATE_CODE:' + statecode;
     w = open(url,"winLov","Scrollbars=0,resizable=0,width=300,height=200");
     if (w.opener == null)
     {
      w.opener = self;
     }
     w.focus();
    }
    

    You will need to go through the instructions and change what either the table and field names do not match what you have.

    Andy

  • How to insert values into a view created on multiple tables

    Hi all

    My goal for insert values in a view
    So for this I created a trigger
    then I tried to insert the value in the view, im getting as inserted row, but the value is not getting inserted

    Here are the steps I followed:


    SQL > create table (x int primary key)
    2.

    Table created.

    SQL > create table b (x references a, varchar2 (30)) y
    2.

    Table created.

    SQL > insert into a values (1)
    2.

    1 line of creation.

    SQL > insert into b values (1, 'One')
    2.

    1 line of creation.

    SQL > create or replace view v
    2 as
    3 select a.x, b.x as b_x, a y, and b where a.x = b.x
    4.

    Created view.

    SQL > select * from v
    2.

    X B_X Y
    ---------- ---------- ------------------------------
    1 1 a

    SQL > create or replace trigger v_t
    2 instead of inserting it on v
    3 for each line
    4 start
    case 5: old.x <>: new.x then
    6. Insert in a values(:new.x);
    7 end if;
    case 8: old.b_x <>: new.b_x then
    9 insert into b values (:new.b_x,:new.y);
    10 end if;
    11 * end;
    SQL > /.

    Trigger created.

    SQL > insert into v values (20,20, 'Twenty')
    2.

    1 line of creation.

    SQL > select * from v
    2.

    X B_X Y
    ---------- ---------- ------------------------------
    1 1 a


    Can anyone suggest me a valid query to insert data into a view that is created on several tables.

    Thanks in advance,
    Shalini

    Hi Shalini,

    You don't need the code if in your trigger.
    That's more like code when you update, you don't compare OLD and insert the NEW values on.

    MHO%xe> create table a(x int primary key);
    
    Tabel is aangemaakt.
    
    Verstreken: 00:00:00.11
    MHO%xe>
    MHO%xe> create table b(x references a,y varchar2(30));
    
    Tabel is aangemaakt.
    
    Verstreken: 00:00:01.09
    MHO%xe>
    MHO%xe> insert into a values(1);
    
    1 rij is aangemaakt.
    
    Verstreken: 00:00:00.01
    MHO%xe>
    MHO%xe> insert into b values(1,'One');
    
    1 rij is aangemaakt.
    
    Verstreken: 00:00:00.06
    MHO%xe>
    MHO%xe> create or replace view v as
      2  select a.x
      3  ,      b.x as b_x
      4  ,      y
      5  from   a
      6  ,      b
      7  where  a.x = b.x;
    
    View is aangemaakt.
    
    Verstreken: 00:00:01.07
    MHO%xe>
    MHO%xe> select * from v;
    
             X        B_X Y
    ---------- ---------- ------------------------------
             1          1 One
    
    Verstreken: 00:00:00.04
    MHO%xe>
    MHO%xe> create or replace trigger v_t
      2  instead of insert on v
      3  for each row
      4  begin
      5      insert into a values(:new.x);
      6      insert into b values(:new.b_x,:new.y);
      7  end;
      8  /
    
    Trigger is aangemaakt.
    
    Verstreken: 00:00:01.64
    MHO%xe>
    MHO%xe> insert into v values(20,20,'Twenty');
    
    1 rij is aangemaakt.
    
    Verstreken: 00:00:00.06
    MHO%xe>
    MHO%xe> select * from v;
    
             X        B_X Y
    ---------- ---------- ------------------------------
             1          1 One
            20         20 Twenty
    
  • records inserted duplicates and not inserted values

    Hi all

    create the table XXC_ORDERS (inventory_item_id customer_id number, number, budget_entity varchar2 (10), number of EXCHANGE_RATE, CURRENCY_CODE varchar2 (10));

    create table XXC_SALES1 (inventory_item_id customer_id number, number, budget_entity varchar2 (10), number of EXCHANGE_RATE, CURRENCY_CODE varchar2 (10));

    create table XXC_BUDGET (inventory_item_id customer_id number, number, budget_entity varchar2 (10), number of EXCHANGE_RATE, CURRENCY_CODE varchar2 (10));

    create table XXC_SALES_BUDGET (inventory_item_id customer_id number, number, budget_entity varchar2 (10), number of EXCHANGE_RATE, CURRENCY_CODE varchar2 (10));

    -drop table XXC_SALES_BUDGET

    insert into XXC_ORDERS

    SELECT 27962, 68329, 0.82082, 'US', '93'

    DOUBLE;

    CREATE VIEW Orders_V1 AS

    SELECT *.

    OF XXC_ORDERS;

    insert into XXC_SALES1

    SELECT 68329, 27962, '93', NULL, 'EUR '.

    DOUBLE;

    CREATE VIEW Sales_V1 AS

    SELECT *.

    OF XXC_SALES1;

    insert into XXC_BUDGET

    SELECT 68329, 27962, 'CZK', NULL, NULL

    DOUBLE;

    CREATE VIEW Budget_V1 AS

    SELECT *.

    OF XXC_BUDGET;

    DECLARE

    V_ITEM_ID number;

    number of v_cust_id;

    v_Entity varchar2 (10);

    number of v_rate;

    v_curr varchar2 (10);

    CURSOR c_1

    IS

    SELECT INVENTORY_ITEM_ID,

    CUSTOMER_ID,

    BUDGET_ENTITY,

    EXCHANGE_RATE,

    CURRENCY_CODE

    OF XXC_ORDERS

    UNION

    SELECT INVENTORY_ITEM_ID,

    CUSTOMER_ID,

    BUDGET_ENTITY,

    EXCHANGE_RATE,

    CURRENCY_CODE

    OF XXC_SALES1

    UNION

    SELECT INVENTORY_ITEM_ID,

    CUSTOMER_ID,

    BUDGET_ENTITY,

    EXCHANGE_RATE,

    CURRENCY_CODE

    OF XXC_BUDGET;

    BEGIN

    FOR c_rec IN c_1

    LOOP

    BEGIN

    SELECT INVENTORY_ITEM_ID,

    CUSTOMER_ID,

    BUDGET_ENTITY,

    EXCHANGE_RATE,

    CURRENCY_CODE

    IN v_item_id,.

    v_cust_id,

    v_Entity,

    v_rate,

    v_curr

    OF XXC_ORDERS

    WHERE INVENTORY_ITEM_ID is c_rec. INVENTORY_ITEM_ID

    AND CUSTOMER_ID = c_rec CUSTOMER_ID.

    AND BUDGET_ENTITY = c_rec. BUDGET_ENTITY;

    -AND EXCHANGE_RATE is c_rec. EXCHANGE_RATE

    -AND CURRENCY_CODE is c_rec. CURRENCY_CODE;

    EXCEPTION

    WHILE OTHERS THEN

    V_ITEM_ID: = 0;

    v_cust_id: = 0;

    v_Entity: = null;

    -v_rate: = 0;

    -v_curr: = null;

    End;

    Begin

    INSERT INTO XXC_SALES_BUDGET

    SELECT

    V_ITEM_ID,

    v_cust_id,

    v_Entity,

    v_rate,

    v_curr

    of the double

    WHERE THERE IS NO

    (SELECT 1 OF XXC_SALES_BUDGET y)

    WHERE y.budget_entity = c_rec. BUDGET_ENTITY

    AND y.customer_id = c_rec.customer_id

    AND y.inventory_item_id = c_rec.inventory_item_id

    - AND y.EXCHANGE_RATE = c_rec EXCHANGE_RATE.

    - AND y.CURRENCY_CODE = c_rec. CURRENCY_CODE

    );

    End;

    commit;

    End loop;

    End;

    (1) implementation of duplicates in the table XXC_SALES_BUDGET for the 2nd time

    (2) in my original query in the table XXC_SALES_BUDGET EXCHANGE_RATE, CURRENCY_CODE is NULL, but the test case above, it is punishable by fine

    Post edited by: added test cases 994122

    994122 wrote:

    How to avoid duplicates?

    Thanks John

    "Ostensibly you insert records with null for the column values. When you do this, it is query will be FALSE when you try to compare NULL with the NULL value because NULL = NULL is unknown (it is not true). NULL <> NULL is also unknown. You compare nulls using "IS NULL" "the #1 post


    I made a mistake in this conditions to not exist in INTO clause block where conditions and I added NVL on two blocks, now works well.

    AND nvl (y.currency_code, 'CCC') = nvl(c_rec.currency_code,'CCC')

    AND nvl(y.exchange_rate,1) = nvl(c_rec.exchange_rate,1)

    Question:

    in Zapex ( post #3 )

    MERGE INTO xxc_budget_history one

    USING (SELECT item_id,

    cust_id,

    DECODE (UPPER (BUDGET_ENTITY), 'ABC', '12', BUDGET_ENTITY)

    budget_entity,

    exchange_rate,

    currency_code

    OF xxc_cur_table

    WHERE item_id = 116) b

    WE (a.cust_id = b.cust_id

    AND a.BUDGET_ENTITY = b.BUDGET_ENTITY

    AND a.item_id = b.item_id)

    WHEN MATCHED

    THEN

    GAME UPDATE

    a.EXCHANGE_RATE = b.EXCHANGE_RATE, a.CURRENCY_CODE = b.CURRENCY_CODE

    WHEN NOT MATCHED

    THEN

    INSERT (EXCHANGE_RATE, CURRENCY_CODE)

    VALUES (b.EXCHANGE_RATE, b.CURRENCY_CODE);

    I tried with the above code when my table was below the values but getting even (the values are already validated)

    ITEM_ID CUST_ID UNITS_MONTH1 AMOUNT_MONTH1 EXCHANGE_RATE CURRENCY_CODE BUDGET_ENTITY
    116 836 0 0 12

    But I need to update as below with the existing values

    ITEM_ID CUST_ID UNITS_MONTH1 AMOUNT_MONTH1 EXCHANGE_RATE CURRENCY_CODE BUDGET_ENTITY
    116 836 100 110 12

    Thank you

    you do not see UNITS_MONTH1 and AMOUNT_MONTH1. How do you want to get the update? These two columns should be included in the SELECT, UPDATE and INSERT statements. Then only it will update

Maybe you are looking for