Create a button for inserting into a table

What I can't do, because I've never needed, is to create, in a page (where I have an interactive report), a button is clicked that once performs a simple sql (for example, an insert into a table using the values of page element).

How can I do?

Thank you

Here are some of the steps:

(1) create the button.

(2) then right click on the name of the button and select Create Dynamic Action

(3) give it to DA a name, click Next

(4) on the 'when' step, event should already be "Click" and the name of the button must be filled

(5) for the Condition, you would have a condition when you want that the display of the button.  Say, if your page elements have a certain range of values, and then display this button.  No condition means that the button is always displayed.

(6) for the 'real Action' stage, action, select "run the Code in PL/SQL.

[There are other ways to do this, but it's simple for me.]

(7) in the Code PL/SQL block, enter says:

Begin

INSERT INTO EMP (EMPNO, ENAME, HIREDATE)

VALUES (: P6_EMPNO, 'MARK1970',: P6_HIREDATE);

COMMIT;

END;   -You'd probably all the variables page element

(8) here the part I'm not sure 100%.

For items to submit "Page, name used in YOUR QUERY - in my example page elements, these are P6_EMPNO, P6_HIREDATE (don't note any use of & or: or here.)

Hmm.  Start by putting nothing in "Page of elements to return.   If that fails, then try the same elements of page P6_EMPNO, it P6_HIREDATE as well.

[I'm too lazy to go running at present].

(9) I think that's it.

Howard

Tags: Database

Similar Questions

  • when_button_pressed, inserting into a table

    I created a button 'OK' and in the when_button_pressed, I put the code to insert into a table (X for example), the values of entries in the form (ie., main block B_MAIN). The B_MAIN block is built manually and refers to the X table above.

    The OK button is in a different block called B_ACTION.

    When I run the form and click on 'OK', nothing happens. Is no error message or another. This could be it prevents insertion of data in the table?

    Thank you
    Chiru

    Published by: Megastar_Chiru on February 17, 2009 16:23

    The B_MAIN is the database block? Check the BLOCK of DATA of DATABASE property, it must be set to NO because you entered the data manually.

    Another thing, when using the pl/sql commit it is not necessary to follow by commit_form, since he initiated commit_form built-in function.

  • Insert into a table using the check boxes

    Hello

    I want to insert into a table emp when I press a button "Insert" area of employee report. the SQL query for the report is

    SELECT HTMLDB_ITEM. CheckBox(1,rowNum) "",
    x.EmpNo,
    x.Ename
    de)
    Select empno htmldb_item.hidden(2,empno),
    htmldb_item. Text(3,Ename) ename from emp) x
    order by 2

    I created the following process:

    declare
    v_test varchar (10);
    Start
    BECAUSE me in 1.HTMLDB_APPLICATION. G_F01. COUNTY
    LOOP
    v_test: = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
    dbms_output.put_line (v_test);
    insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
    values(v_test,'A','B',10,01-May-81,200,1,10)
    WHERE empno = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
    END LOOP;
    end;

    But IT is not working properly, infact, it gives me errors like:

    ORA-06550: line 9, column 47:
    PL/SQL: ORA-00933: SQL not correctly completed command
    ORA-06550: line 8, column 1:
    PL/SQL: SQL statement ignored

    7 dbms_output.put_line (v_test);
    8 insert into emp (empno, ename, job, mgr, hiredate, sal, comm, deptno)
    9 values(v_test,'A','B',10,01-MAY-81,200,1,10)
    10 WHERE empno = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
    11. END OF LOOP;

    Any help?
    Additional info: table Emp is the default table in the database

    This is an example showiing how such a process must be put in place:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:95

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to identify the name of the procedure that inserts into a table in the TRIGGER

    Hello
    There are several procedures in my DB that perform the INSERT operation on a main table - MYTAB say.

    I created a trigger on the table MYTAB, to follow closely, what procedure is insert data in there. Is there a function that captures the name of this object?

    For example: PROC_A, PROC_B, PROC_C insert into the table MYTAB. And my query is - the trigger on table MYTAB should document these object names where the lines fit.
    Please let me know your suggestions...

    SQL> create table t (no integer, dt timestamp, who_inserted varchar2(4000));
    
    Table created.
    
    SQL> create or replace procedure p
      2  as
      3  begin
      4    insert into t (no, dt) values (1, systimestamp);
      5  end;
      6  /
    
    Procedure created.
    
    SQL> show err
    No errors.
    
    SQL> create or replace trigger t_trig before insert on t for each row
      2  begin
      3     :new.who_inserted := dbms_utility.format_call_stack;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> show err
    No errors.
    
    SQL> begin
      2    p;
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t;
    
            NO DT                             WHO_INSERTED
    ---------- ------------------------------ ----------------------------------------
             1 31-OCT-14 04.58.53.668465 AM   ----- PL/SQL Call Stack -----
                                                object      line  object
                                                handle    number  name
                                              3a7ddbea0         2  KARTHICK.T_TRIG
                                              3ac979f30         4  procedure KARTHICK.P
                                              3a822deb8         2  anonymous block
    
  • Extract the XML tags and insert into the table

    Description:

    XML is under inert atmosphere in the table containing the xmltype column. Need to extract value from xml tag and insert into the table.
    Once the XML record Treaty must update the status as 'Y' in the base table

    Problem:
    There are multiple occurrences of some tags that need to be combined and stored in a single column to delineate the '-'. No. area of occurrence can vary for each record.
    There are a few encrypted column that I managed to convert decoded value. But used select distinct... XMLTYPE...
    GTT table is used to store the intermediate result and decoding and the concatenation of several tags occurred using TWG.

    1.No. multiple tag will vary how to extract those and concatenate them into a single column. I assumed his occrrence in 3 for example: < student >
    2. how to set the value NULL if no tag is not present. Tag in XML record number can vary. I know that the complete list of xmltags.
    3 data not found error for some xml documents.

    Kindly Assits how to achieve this.

    version: 11.2.0.3.0

    Table Base: temp_XML

    XML_ID NOT NULL NUMBER (28) - auto-increment using the sequence
    PUBLIC EVENT. Stores the XMLTYPE STORAGE BINARY - XML file
    DATE OF EVTDATE
    STATUS VARCHAR2 (3) DEFAULT ' don't

    Sample XML: Includes all the brands mentioned in the common procedure below.

    <? XML version = "1.0" encoding = "US-ASCII"? >

    "< event xmlns ="http://xmlextrac.test.com/object">."

    < data xmlns = "" >

    < object >

    <>units

    < unit > TLAS < / unit >

    < unit > ATLAS < / unit >

    < / units >

    < receiverNetworks >

    < receiverNetwork > ABSAZAJ0XXXX < / receiverNetwork >

    < / receiverNetworks >

    < correspondentIds >

    < correspondentId > #SWF - ABSAZAJ0XXX < / correspondentId >

    < / correspondentIds >

    < comment >

    < comment / >

    < comment / >

    < comment / >

    < comment / >

    < / comment >

    < memo >

    < memo > 28 < / memo >

    < / memos >

    < tuxedoPriority > 20 < / tuxedoPriority >

    sender <>Mike < / sender >

    < typeReseauId > Message < / typeReseauId >

    < maxRetry > 4 < / maxRetry >

    < msgSecuLevel > CBA < / msgSecuLevel >

    < quantity >

    < amount > 12 < / amount >

    < amount > 34 < / amount >

    < amount > 56 < / amount >

    < / amounts >

    < currencys >

    < currency > $ < / currency >

    < currency > EUR < / currency >

    INR < currency > < / currency >

    < / currencys >

    < msgDateVal > ARST123 < / msgDateVal >

    wder < direction > < / direction >

    < eventType > 113 < / eventType >

    < date > 1407431619 < / date >

    < eventDate > 1407431624 < / eventDate >

    < management > R < / direction >

    < msgRef > R950140807AB6CBE < / msgRef >

    < format > SWF < / size >

    < type > 950 < / type >

    R950140807AB6CBE < WALL > < / WALL >

    < bankingPriority / >

    FSDS < field.20 > < / field.20 >

    < texteType > FSS < / texteType >

    < applicationCode > OHS < / applicationCode >

    < company > KETH < / company >

    < endFct > MOE < / endFct >

    < rate > BAM < / flow >

    < subtype / >

    < text > DQo6MjA6R0wxNDA4MDcwMDA1MTMNCjoyNTo3M == < / text >

    < msgHeaders > ezE6RjAxTE9ZRE5MMjBCWFhYMDAzMjAw = < / msgHeaders >

    < msgTrailer > ezU6e0NISzpEOUFFRUNCN0NBQTl9e1RORzp9fQ == < / msgTrailer >

    < / object >

    < / data >

    Procedure: This works very well for a few xml record and fails for some.

    CREATE OR REPLACE PROCEDURE XML_EXTR
    AS
    CURSOR c1
    IS
    SELECT * FROM temp_XML;

    c1_cur c1% ROWTYPE;

    bamdata_sql VARCHAR2 (3000);
    d_text VARCHAR2 (3000);
    d_msgHeaders VARCHAR2 (3000);
    d_msgTrailer VARCHAR2 (3000);
    x_text VARCHAR2 (3000);
    x_msgHeaders VARCHAR2 (3000);
    x_msgTrailer VARCHAR2 (3000);
    x_eventType VARCHAR2 (3000);
    x_amount number (28.2).
    x_currency VARCHAR2 (3000);
    x_state VARCHAR2 (3000);
    x_units VARCHAR2 (3000);
    x_correspondentId VARCHAR2 (3000);
    X_TYPE VARCHAR2 (3000);
    x_receiverNetworks VARCHAR2 (3000);
    x_bankingPriority VARCHAR2 (3000);
    x_applicationCode VARCHAR2 (3000);
    x_processCounter VARCHAR2 (3000);
    x_obsolescence VARCHAR2 (3000);
    x_maxRetry VARCHAR2 (3000);
    x_retries VARCHAR2 (3000);
    x_fileSize VARCHAR2 (3000);
    x_endFct VARCHAR2 (3000);
    x_subType VARCHAR2 (3000);
    x_field20 VARCHAR2 (3000);
    x_sequenceNumber VARCHAR2 (3000);
    x_requestorDn VARCHAR2 (3000);
    x_responderDn VARCHAR2 (3000);
    x_SWIFTNetService VARCHAR2 (3000);
    x_transfertRef VARCHAR2 (3000);
    x_nonrepudiation VARCHAR2 (3000);
    x_transfertInfo VARCHAR2 (3000);
    x_fileDesc VARCHAR2 (3000);
    x_transfertDesc VARCHAR2 (3000);
    x_logicalName VARCHAR2 (3000);
    x_signIndicator VARCHAR2 (3000);
    x_critId VARCHAR2 (3000);
    x_inFapId VARCHAR2 (3000);
    x_deliveryNotif VARCHAR2 (3000);
    x_comment1 VARCHAR2 (3000);
    x_comment2 VARCHAR2 (3000);
    x_comment3 VARCHAR2 (3000);
    x_comment4 VARCHAR2 (3000);
    x_comments VARCHAR2 (3000);
    x_memo1 VARCHAR2 (3000);
    x_memo2 VARCHAR2 (3000);
    x_memo3 VARCHAR2 (3000);
    x_memo4 VARCHAR2 (3000);
    x_msgSecuLevel VARCHAR2 (3000);
    x_dates VARCHAR2 (3000);
    x_tuxedoPriority VARCHAR2 (3000);
    x_fileDest VARCHAR2 (3000);
    x_stkMsgPDEId VARCHAR2 (3000);
    x_EMTId VARCHAR2 (3000);
    x_LTRcptSyno VARCHAR2 (3000);
    x_LTRcpt VARCHAR2 (3000);
    x_LTEmis VARCHAR2 (3000);
    x_flow VARCHAR2 (3000);
    x_FINCopy VARCHAR2 (3000);
    x_msgDateVal VARCHAR2 (3000);
    x_eventDate VARCHAR2 (3000);
    x_typeReseauId VARCHAR2 (3000);
    x_inFapSeq1 VARCHAR2 (3000);
    x_inFapSeq2 VARCHAR2 (3000);
    x_direction VARCHAR2 (3000);
    x_priority VARCHAR2 (3000);
    x_ack VARCHAR2 (3000);
    x_format VARCHAR2 (3000);
    x_mur VARCHAR2 (3000);
    x_TexteType VARCHAR2 (3000);
    x_creatingUser VARCHAR2 (3000);
    x_fileinfo VARCHAR2 (3000);
    x_company VARCHAR2 (3000);
    x_language VARCHAR2 (3000);
    x_ackText VARCHAR2 (3000);
    x_jaxbRef VARCHAR2 (3000);
    x_jaxbElt VARCHAR2 (3000);
    x_memos VARCHAR2 (3000);
    xmlid number (28);
    x_msgRef1 VARCHAR2 (3000);
    x_msgRef2 VARCHAR2 (3000);
    x_msgRef3 VARCHAR2 (3000);
    x_msgRef4 VARCHAR2 (3000);
    x_sender VARCHAR2 (3000);
    x_amlBehavior VARCHAR2 (3000);
    x_ownerServiceId VARCHAR2 (3000);
    x_correspondentName VARCHAR2 (3000);
    x_correspondentAddress1 VARCHAR2 (3000);
    x_correspondentAddress2 VARCHAR2 (3000);
    x_correspondentAddress3 VARCHAR2 (3000);
    x_correspondentAddress4 VARCHAR2 (3000);
    x_correspondentCity VARCHAR2 (3000);
    x_correspondentCountry VARCHAR2 (3000);
    x_correspondentNetworkAddr VARCHAR2 (3000);
    x_tested VARCHAR2 (3000);
    x_correspondentNetwork VARCHAR2 (3000);
    x_validatedPercentage VARCHAR2 (3000);
    x_nbOfValid VARCHAR2 (3000);
    x_requestRef VARCHAR2 (3000);
    x_notifQueue VARCHAR2 (3000);
    x_requestType VARCHAR2 (3000);
    x_secBpid VARCHAR2 (3000);
    x_queue VARCHAR2 (3000);
    x_receiverCode VARCHAR2 (3000);
    x_receiverInd VARCHAR2 (3000);
    x_validFlag VARCHAR2 (3000);
    x_ownerId VARCHAR2 (3000);
    x_dn VARCHAR2 (3000);
    x_RMAOurBic VARCHAR2 (3000);
    x_RMACorrespondentBic VARCHAR2 (3000);
    x_RMAService VARCHAR2 (3000);
    x_fileMsgRef VARCHAR2 (3000);
    date of x_ext_date;
    x_correspondentAddress VARCHAR2 (3000);
    x_msgrefs varchar2 (3000);
    d_ackText varchar2 (3000);
    ackText varchar2 (3000);
    date of x_extdate;

    BEGIN

    FOR C1_CUR IN C1

    LOOP

    INSERT INTO data_GTT_TEMP)
    eventType, amount, currency, State, units, correspondentId, sender, receiverNetworks, bankingPriority, applicationCode, processCounter.
    obsolescence, maxRetry, reminders, fileSize, endFct, xsubType, field.20, sequenceNumber, requestorDn, responderDn, SWIFTNetService, non-repudiation,
    transfertRef, transfertInfo, fileDesc, transfertDesc, logicalName, signIndicator, critId, inFapId, deliveryNotif, comment1, comment2, comment3, comment4,
    Memo1, memo2, memo3, memo4, msgSecuLevel, dates, tuxedoPriority, fileDest, stkMsgPDEId, EMTId, LTRcptSyno, LTRcpt, LTEmis, flow, FINCopy, msgDateVal,
    eventDate, typeReseauId, inFapSeq1, inFapSeq2, direction, priority, ack,
    msgRef1, msgRef2, msgRef3, msgRef4, amlbehavior, correspondentName, ownerServiceId,
    correspondentAddress1, correspondentAddress2, correspondentAddress3, correspondentAddress4,
    correspondentCity, correspondentCountry, correspondentNetworkAddr, tested,
    correspondentNetwork, validatedPercentage, nbOfValid, requestRef, notifQueue,
    requestType, secBpid, xqueue, receiverCode, receiverInd, validFlag, ownerId, dn, RMAOurBic, RMACorrespondentBic, RMAService,
    fileMsgRef, format, xtype, wall, TexteType, creatingUser, fileinfo,
    company, text, xlanguage, ackText, msgHeaders, msgTrailer, jaxbRef, jaxbElt)
    SELECT
    x.eventType, x.amount, x.currency, x.state, x.units, x.correspondentId, x.sender, x.receiverNetworks, x.bankingPriority, x.applicationCode, x.processCounter,
    x.obsolescence, x.maxRetry, x.Retries, x.FileSize, x.endFct, x.xsubType, x.Field20, x.SequenceNumber, x.requestorDn, x.responderDn, x.SWIFTNetService, x.nonRepudiation,
    x.transfertRef, x.transfertInfo, x.fileDesc, x.transfertDesc, x.logicalName, x.signIndicator, x.critId, x.inFapId, x.deliveryNotif, x.comment1, x.comment2,
    x.comment3, x.comment4, x.Memo1, x.memo2, x.memo3, x.MEMO4, x.msgSecuLevel, x.dates, x.tuxedoPriority, x.fileDest, x.stkMsgPDEId, x.EMTId, x.LTRcptSyno,
    x.LTRcpt, x.LTEmis, x.flow, x.FINCopy, x.msgDateVal, x.eventDate, x.typeReseauId, x.inFapSeq1, x.inFapSeq2, x.direction, x.priority, x.ack,
    x.msgRef1, x.msgRef2, x.msgRef3, x.msgRef4, x.amlbehavior, x.correspondentName, x.ownerServiceId,
    x.correspondentAddress1, x.correspondentAddress2, x.correspondentAddress3, x.correspondentAddress4,
    x.correspondentCity, x.correspondentCountry, x.correspondentNetworkAddr, x.tested,
    x.correspondentNetwork, x.validatedPercentage, x.nbOfValid, x.requestRef, x.notifQueue,
    x.requestType, x.secBpid, x.xqueue, x.receiverCode, x.receiverInd, x.validFlag, x.ownerId, x.dn, x.RMAOurBic, x.RMACorrespondentBic, x.RMAService,
    x.fileMsgRef, x.format, x.xtype, x.mur, x.TexteType, x.creatingUser, x.fileinfo,
    x.Company, x.Text, x.xLanguage, x.ackText, x.msgHeaders, x.msgTrailer, x.jaxbRef, x.jaxbElt

    of temp_XML t, XMLTABLE (XMLNAMESPACES ('http://xmlextrac.test.com/object' as "ns0"), ' / ns0:event' )
    PASSAGE t.BAM_EVENT COLUMNS
    eventType varchar2 (3000) PATH 'data, object, eventType' DEFAULT NULL,
    amount number (28.2) path data/object/amounts"."
    currency varchar2 (3000) PATH 'data, object, currencys, currency' DEFAULT NULL,
    VARCHAR2 (3000) path "data/object / / state of ' DEFAULT NULL, State
    units varchar2 (3000) PATH ' object/data/units' DEFAULT NULL,
    correspondentId varchar2 (3000) PATH "data/object/correspondentIds' DEFAULT NULL,
    sender varchar2 (3000) PATH 'data, object, sender' DEFAULT NULL,
    receiverNetworks varchar2 (3000) PATH "data/object/receiverNetworks' DEFAULT NULL,
    bankingPriority varchar2 (3000) PATH "data/object/bankingPriority' DEFAULT NULL,
    applicationCode varchar2 (3000) PATH ' object/data/applicationCode' DEFAULT NULL,
    processCounter varchar2 (3000) PATH "data/object/processCounter' DEFAULT NULL,
    obsolescence varchar2 (3000) PATH ' data/object/obsolescence' DEFAULT NULL,
    maxRetry varchar2 (3000) PATH ' data/object/maxRetry' DEFAULT NULL,
    attempts to varchar2 (3000) "data/object/attempts" DEFAULT NULL path,.
    size of the file varchar2 (3000) PATH ' data/object/fileSize' DEFAULT NULL,
    endFct varchar2 (3000) PATH "data/object/endFct' DEFAULT NULL,
    xsubType varchar2 (3000) PATH "data/object/subtype' DEFAULT NULL,
    field.20 varchar2 (3000) PATH ' object/data/field.20' DEFAULT NULL,
    sequenceNumber varchar2 (3000) PATH "data/object/sequenceNumber" DEFAULT NULL,
    requestorDn varchar2 (3000) PATH "data/object/requestorDn' DEFAULT NULL,
    responderDn varchar2 (3000) PATH "data/object/responderDn' DEFAULT NULL,
    SWIFTNetService varchar2 (3000) PATH "data/object/SWIFTNetService' DEFAULT NULL,
    non-repudiation varchar2 (3000) PATH ' object/data/repudiation' DEFAULT NULL,
    transfertRef varchar2 (3000) PATH "data/object/transfertRef' DEFAULT NULL,
    transfertInfo varchar2 (3000) PATH "data/object/transfertInfo' DEFAULT NULL,
    fileDesc varchar2 (3000) PATH "data/object/fileDesc' DEFAULT NULL,
    transfertDesc varchar2 (3000) PATH "data/object/transfertDesc' DEFAULT NULL,
    logicalName varchar2 (3000) PATH "data/object/logicalName" DEFAULT NULL,
    signIndicator varchar2 (3000) PATH "data/object/signIndicator' DEFAULT NULL,
    critId varchar2 (3000) PATH "data/object/critId' DEFAULT NULL,
    inFapId varchar2 (3000) PATH "data/object/inFapId' DEFAULT NULL,
    deliveryNotif varchar2 (3000) PATH "data/object/deliveryNotif' DEFAULT NULL,
    COMMENT1 varchar2 (3000) PATH ' data, subject, comments, comment [1] "DEFAULT NULL,
    comment2 varchar2 (3000) PATH 'data, subject, comments, how [2]' DEFAULT NULL,
    comment3 varchar2 (3000) PATH "data/object/observations/comments [3]" DEFAULT NULL,
    comment4, varchar2 (3000) PATH ' data, subject, comments, comment [4] "DEFAULT NULL,
    Memo1 varchar2 (3000) PATH "data/object/memos/memo [1]" DEFAULT NULL,
    Memo2 varchar2 (3000) PATH "data/object/notes/Notes [2]" DEFAULT NULL,
    memo3 varchar2 (3000) PATH "data/object/memos/memo [3]" DEFAULT NULL,
    MEMO4 varchar2 (3000) PATH "data/object/memos/memo [4]" DEFAULT NULL,
    msgSecuLevel varchar2 (3000) PATH "data/object/msgSecuLevel' DEFAULT NULL,
    Date varchar2 (3000) PATH ' object/data/date' DEFAULT NULL,
    tuxedoPriority varchar2 (3000) PATH "data/object/tuxedoPriority' DEFAULT NULL,
    fileDest varchar2 (3000) PATH "data/object/fileDest' DEFAULT NULL,
    stkMsgPDEId varchar2 (3000) PATH "data/object/stkMsgPDEId' DEFAULT NULL,
    EMTId varchar2 (3000) PATH "data/object/EMTId' DEFAULT NULL,
    LTRcptSyno varchar2 (3000) PATH "data/object/LTRcptSyno' DEFAULT NULL,
    LTRcpt varchar2 (3000) PATH "data/object/LTRcpt' DEFAULT NULL,
    LTEmis varchar2 (3000) PATH "data/object/LTEmis' DEFAULT NULL,
    flow varchar2 (3000) PATH "/ object/data flow ' DEFAULT NULL,
    FINCopy varchar2 (3000) PATH ' data/object/FINCopy' DEFAULT NULL,
    msgDateVal varchar2 (3000) PATH "data/object/msgDateVal' DEFAULT NULL,
    eventDate varchar2 (3000) PATH "data/object/eventDate" DEFAULT NULL,
    typeReseauId varchar2 (3000) PATH "data/object/typeReseauId' DEFAULT NULL,
    inFapSeq1 varchar2 (3000) PATH "data/object/inFapSeq1' DEFAULT NULL,
    inFapSeq2 varchar2 (3000) PATH "data/object/inFapSeq2' DEFAULT NULL,
    direction varchar2 (3000) PATH 'data, object, direction' DEFAULT NULL,
    priority varchar2 (3000) PATH ' data/object/priority' DEFAULT NULL,
    ACK varchar2 (3000) PATH ' object/data/ack' DEFAULT NULL,
    msgRef1 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [1] "DEFAULT NULL,
    msgRef2 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [2] "DEFAULT NULL,
    msgRef3 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [3] "DEFAULT NULL,
    msgRef4 varchar2 (3000) PATH ' data, object, msgRefs, msgRef [4] "DEFAULT NULL,
    amlBehavior varchar2 (3000) PATH "data/object/amlBehavior' DEFAULT NULL,
    ownerServiceId varchar2 (3000) PATH "data/object/ownerServiceId' DEFAULT NULL,
    correspondentName varchar2 (3000) PATH ' data/object/correspondentName' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress1 ' object/data/correspondentLine1Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress2 ' object/data/correspondentLine2Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress3 ' object/data/correspondentLine3Addresse' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of correspondentAddress4 ' object/data/correspondentLine4Addresse' DEFAULT NULL,
    correspondentCity PATH VARCHAR2 (3000) ' object/data/correspondentCity' DEFAULT NULL,
    correspondentCountry PATH VARCHAR2 (3000) ' object/data/correspondentCountry' DEFAULT NULL,
    correspondentNetworkAddr PATH VARCHAR2 (3000) ' object/data/correspondentNetworkAddr' DEFAULT NULL,
    tested VARCHAR2 (3000) PATH ' data/object/tested' DEFAULT NULL,
    correspondentNetwork PATH VARCHAR2 (3000) ' object/data/correspondentNetwork' DEFAULT NULL,
    validatedPercentage PATH VARCHAR2 (3000) ' object/data/validatedPercentage' DEFAULT NULL,
    nbOfValid PATH VARCHAR2 (3000) ' object/data/nbOfValid' DEFAULT NULL,
    requestRef VARCHAR2 (3000) PATH ' data/object/requestRef' DEFAULT NULL,
    notifQueue PATH VARCHAR2 (3000) ' object/data/notifQueue' DEFAULT NULL,
    requestType PATH VARCHAR2 (3000) ' data/object/requestType' DEFAULT NULL,
    secBpid PATH VARCHAR2 (3000) ' object/data/secBpid' DEFAULT NULL,
    xqueue PATH VARCHAR2 (3000) ' data/object/tail' DEFAULT NULL,
    receiverCode PATH VARCHAR2 (3000) ' object/data/receiverCode' DEFAULT NULL,
    receiverInd PATH VARCHAR2 (3000) ' object/data/receiverInd' DEFAULT NULL,
    validFlag PATH VARCHAR2 (3000) ' object/data/validFlag' DEFAULT NULL,
    ownerId PATH VARCHAR2 (3000) ' data/object/ownerId' DEFAULT NULL,
    DN VARCHAR2 (3000) PATH ' data/object/dn' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMAOurBic ' object/data/RMAOurBic' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMACorrespondentBic ' object/data/RMACorrespondentBic' DEFAULT NULL,
    PATH of VARCHAR2 (3000) of RMAService ' object/data/RMAService' DEFAULT NULL,
    fileMsgRef PATH VARCHAR2 (3000) ' object/data/fileMsgRef' DEFAULT NULL,
    ackText varchar2 (3000) PATH "data/object/ackText' DEFAULT NULL,
    format varchar2 (3000) PATH "data/object / ' DEFAULT NULL,
    xType varchar2 (3000) PATH ' data/object/type' DEFAULT NULL,
    Wall varchar2 (3000) PATH ' data/object/wall' DEFAULT NULL,
    texteType varchar2 (3000) PATH "data/object/texteType' DEFAULT NULL,
    creatingUser varchar2 (3000) PATH ' data/object/creatingUser' DEFAULT NULL,
    fileInfo varchar2 (3000) PATH ' data/object/fileInfo' DEFAULT NULL,
    VARCHAR2 (3000) path ' data/object/society' DEFAULT NULL, the company
    VARCHAR2 (3000) text ' data/object/text' DEFAULT NULL path.
    xLanguage varchar2 (3000) PATH ' data/object/language' DEFAULT NULL,
    msgHeaders varchar2 (3000) PATH "data/object/msgHeaders' DEFAULT NULL,
    msgTrailer varchar2 (3000) PATH "data/object/msgTrailer' DEFAULT NULL,
    jaxbRef varchar2 (3000) PATH ' info/jaxbRef' DEFAULT NULL,
    jaxbElt varchar2 (3000) PATH "jaxbElt/info") x
    where t.XML_ID = c1_cur. XML_ID and t.status =' no;

    Select x.text, x.msgHeaders, x.msgTrailer in x_msgTrailer, x_msgHeaders, x_text of
    temp_XML t, XMLTABLE (XMLNAMESPACES ('http://xmlextrac.test.com/object' as "ns0"), ' / ns0:event' )
    PASSAGE t.BAM_EVENT COLUMNS
    text varchar2 (3000) PATH data/object/text"."
    msgHeaders varchar2 (3000) PATH "data/object/msgHeaders,"
    msgTrailer varchar2 (3000) PATH "object/data/msgTrailer.
    ) x
    where t.XML_ID = c1_cur. XML_ID;
    Select sysdate in double x_extdate;


    d_text: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_text)));
    d_msgHeaders: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_msgHeaders)));
    d_msgTrailer: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (x_msgTrailer)));
    -d_ackText: = utl_raw.cast_to_varchar2 (utl_encode.base64_decode (utl_raw.cast_to_RAW (ackText)));

    Select
    EventType, amount, currency, State, units, correspondentid, sender, receivernetworks, bankingpriority,
    applicationcode, processcounter, obsolescence, maxretry, reminders, filesize, endfct, xsubtype, field.20, sequencenumber, requestordn,
    responderdn, swiftnetservice, non repudiation, transfertref, transfertinfo, filedesc, transfertdesc, logicalname, signindicator,
    critid, infapid, deliverynotif, comment1, comment2, comment3, comment4, memo1, memo2, memo3, memo4, msgseculevel, dates, tuxedopriority, filedest,
    stkmsgpdeid, emtid, ltrcptsyno, ltrcpt, ltemis, flow, fincopy, msgdateval, eventdate, typereseauid, infapseq1,
    infapseq2, direction, priority, ack, msgref1, msgref2, msgref3, msgref4, amlbehavior, ownerserviceid, correspondentname, correspondentaddress1, correspondentaddress2, correspondentaddress3, correspondentaddress4,
    correspondentcity, correspondentcountry, correspondentnetworkaddr, test, correspondentnetwork, validatedpercentage, nbofvalid,.
    requestref, notifqueue, requesttype, secbpid, xqueue, receivercode, receiverind, validflag, ownerid, dn, rmaourbic, rmacorrespondentbic, rmaservice, filemsgref,
    acktext, format, xtype, wall, textetype, creatinguser, fileinfo, society, text, xlanguage, msgheaders, msgtrailer, jaxbref, jaxbelt
    in
    x_eventtype, x_amount, x_currency, x_state, x_units, x_correspondentid, x_sender, x_receivernetworks, x_bankingpriority, x_applicationcode, x_processcounter,
    x_obsolescence, x_maxretry, x_retries, x_filesize, x_endfct, x_subtype, x_field20, x_sequencenumber, x_requestordn, x_responderdn, x_swiftnetservice, x_nonrepudiation,
    x_transfertref, x_transfertinfo, x_filedesc, x_transfertdesc, x_logicalname, x_signindicator, x_critid, x_infapid, x_deliverynotif, x_comment1, x_comment2, x_comment3,
    x_comment4, x_memo1, x_memo2, x_memo3, x_memo4, x_msgseculevel, x_dates, x_tuxedopriority, x_filedest, x_stkmsgpdeid, x_emtid, x_ltrcptsyno, x_ltrcpt,
    x_ltemis, x_flow, x_fincopy, x_msgdateval, x_eventdate, x_typereseauid, x_infapseq1, x_infapseq2, x_direction, x_priority, x_ack, x_msgref1, x_msgref2,
    x_msgref3, x_msgref4, x_amlbehavior, x_ownerserviceid, x_correspondentname, x_correspondentaddress1, x_correspondentaddress2, x_correspondentaddress3,
    x_correspondentaddress4, x_correspondentcity, x_correspondentcountry, x_correspondentnetworkaddr, x_tested, x_correspondentnetwork, x_validatedpercentage,
    x_nbofvalid, x_requestref, x_notifqueue, x_requesttype, x_secbpid, x_queue, x_receivercode, x_receiverind, x_validflag, x_ownerid, x_dn, x_rmaourbic,
    x_rmacorrespondentbic, x_rmaservice, x_filemsgref, x_acktext, x_format, x_type, x_mur, x_textetype, x_creatinguser, x_fileinfo, x_company, x_text,
    x_language, x_msgheaders, x_msgtrailer, x_jaxbref, data_GTT_TEMP x_jaxbelt;

    x_memos: = x_memo1 | » -'|| x_memo2 | » -'|| x_memo3 | » -'|| x_memo4;
    x_comments: = x_comment1 | » -'|| x_comment2 | » -'|| x_comment3 | » -'|| x_comment4;
    x_correspondentAddress: = x_correspondentAddress1 | » -'|| x_correspondentAddress2 | » -'|| x_correspondentAddress3 | » -'|| x_correspondentAddress4;
    x_msgrefs: = x_msgRef1 | » -'|| x_msgRef2 | » -'|| x_msgRef3 | » -'|| x_msgRef4;

    BEGIN


    insert into donnees_xml
    (xml_id, x_ext_date, eventtype, amount, currency, State, unit, correspondentid, sender, receivernetworks, bankingpriority, applicationcode,
    ProcessCounter, obsolescence, maxretry, reminders, filesize, endfct, xsubtype, field.20, sequencenumber, requestordn, responderdn,
    swiftnetservice, non repudiation, transfertref, transfertinfo, filedesc, transfertdesc, logicalname, signindicator, critid, infapid,
    deliverynotif, comments, notes, msgseculevel, dates, tuxedopriority, filedest, stkmsgpdeid, emtid, ltrcptsyno, ltrcpt, ltemis, flow,
    FINCopy, msgdateval, eventdate, typereseauid, infapseq1, infapseq2, direction, priority, ack, msgrefs, amlbehavior, ownerserviceid,
    correspondentName correspondentaddress, correspondentcity, correspondentcountry, correspondentnetworkaddr, tested,
    correspondentnetwork, validatedpercentage, nbofvalid, requestref, notifqueue, requesttype, secbpid, xqueue, receivercode,
    receiverind, validflag, ownerid, dn, rmaourbic, rmacorrespondentbic, rmaservice, filemsgref, acktext, format, xtype, wall,
    textetype, creatinguser, fileinfo, society, text, xlanguage, msgheaders, msgtrailer, jaxbref, jaxbelt)
    values
    (xmlid, x_extdate, x_eventType, x_amount, x_currency, x_state, x_units, x_correspondentId, x_sender, x_receiverNetworks, x_bankingPriority, x_applicationCode,
    x_processCounter, x_obsolescence, x_maxRetry, x_retries, x_fileSize, x_endFct, x_subType, x_field20, x_sequenceNumber, x_requestorDn, x_responderDn,
    x_SWIFTNetService, x_nonRepudiation, x_transfertRef, x_transfertInfo, x_fileDesc, x_transfertDesc, x_logicalName, x_signIndicator, x_critId, x_inFapId,
    x_deliveryNotif, x_comments, x_memos, x_msgSecuLevel, x_dates, x_tuxedoPriority, x_fileDest, x_stkMsgPDEId, x_EMTId, x_LTRcptSyno, x_LTRcpt, x_LTEmis, x_flow,
    x_FINCopy, x_msgDateVal, x_eventDate, x_typeReseauId, x_inFapSeq1, x_inFapSeq2, x_direction, x_priority, x_ack, x_msgrefs, x_amlbehavior, x_ownerServiceId,
    x_correspondentName, x_correspondentAddress, x_correspondentCity, x_correspondentCountry, x_correspondentnetworkaddr, x_tested,
    x_correspondentNetwork, x_validatedPercentage, x_nbOfValid, x_requestRef, x_notifQueue, x_requestType, x_secBpid, x_queue, x_receiverCode,
    x_receiverInd, x_validFlag, x_ownerId, x_dn, x_RMAOurBic, x_RMACorrespondentBic, x_RMAService, x_fileMsgRef, ackText, x_format, x_type, x_mur,
    x_TexteType, x_creatingUser, x_fileinfo, x_company d_text, x_language, d_msgHeaders, d_msgTrailer, x_jaxbRef, x_jaxbElt);

    Update temp_XML set status = 'Y' where XML_ID = xmlid;

    END;
    COMMIT;
    END LOOP;
    END;
    /

    1.No. multiple tag will vary how to extract those and concatenate them into a single column. I assumed that his occrrence in 3 for example:

    Use the fn:string-join() function:

    path varchar2 (4000) of comments 'string-join(comments/comment, "-").

    2. how to set the value NULL if no tag is not present. Tag in XML record number can vary.

    You don't have anything specific to do in this case.

    Missing tags with a projection in the COLUMNS clause will produce a column NULL by default.

  • Use the trigger and seq to insert into 2 tables

    I created a sequence.

    I have 2 tables

    I want a trigger that when I insert in the 1 table inserts the sequence number nextval, that is no problem, but also is there a way so that once that happens it also inserts this same value of sequence in another table.

    So the end result is a new record in the table has the seq value and a new record in table b with the same value of seq (and the rest of the fields blank)

    Thanks for any help

    Could do:

    SQL > create the sequence myseq;

    Order of creation.

    SQL > drop table t2 is serving;

    Deleted table.

    SQL > drop table t1 is serving;

    Deleted table.

    SQL > create table t1 (collar number);

    Table created.

    SQL > create table t2 (collar number);

    Table created.

    SQL > create or replace trigger mytrig

    2 before the Insert on t1

    3 for each line

    4 start

    case 5: new.col is null

    6. can

    7: new.col: = myseq.nextval;

    8 insert into t2 (col)

    9. Select myseq.currval

    10 double;

    11 end if;

    12 end;

    13.

    Trigger created.

    SQL > insert into values (null), t1 (col);

    1 line of creation.

    SQL > select * from t1;

    COL

    ----------

    1

    1 selected line.

    SQL > select * from t2;

    COL

    ----------

    1

    1 selected line.

  • Inserting into the table of the apex report log

    Hi all

    I have an interactive report with check boxes for each line, when I select a checkbox one according to the report and click the button submit that the first records of departure in the report are getting inserted into the table
    the lines that I select in the report is not getting inserted into the table.

    For example, if I select all 4 records in the box and click submit button 4 first records will be inserted into the table. Not the selected records.

    I put all the attributes attribute of standard report columns.

    Here is my code I wrote for the process to insert in the journal table.
    declare
    v_index varchar2(2000);
    begin
     
    FOR i in 1..APEX_APPLICATION.G_F21.COUNT LOOP
    --v_index := APEX_APPLICATION.G_F21(i);
    
    insert into eptlog(ptr , cat , pgroup , splptr,gisv ,
              mptr , hip , oml ,wa_type , stl_acc,last_updated_by )
    values(apex_application.g_f22(i), A-Cat,P-Group,
    'N',
    'Y',
    'N',
    'Y',
    'HIP',
    'APC',
    'N',
    apex_application.g_user);
    
    END LOOP;
    end;
    For the report query
    -------------------
    select 
    apex_item.checkbox(21,'#ROWNUM#','UNCHECKED')||APEX_ITEM.HIDDEN(22,p.cc||'-'||p.name) ptr,
    p.row_id,
    p.cc,
    c.ctrdesc,
    p.name,
    p.cat,
    ptr.onumber,
    p.c_id,
    apex_item.select_list_from_query(23,ptr.ecat, 'select catdesc,cat from ptrcatmst') cat1,
    apex_item.select_list_from_query(24,ptr.partner_group, 'select pgroup,gid from APTNRGROUP') pgroup,
    apex_item.select_list(25,p.gisv,'Y;10,N;20') iv,
    apex_item.select_list(26,p.splptr,'Y;10,N;20')  splptr,
    sum(rate)
    from aptr p
    left outer join aptr_a s on p.name = s.pname and p.cc = s.cc
    left outer join lcomp c on s.cc = c.cc
    where rate>0 and p.cat1<>'D' and s.cc ='10'
    group by rownum,p.row_id,
    p.cc,
    c.ctrydesc,
    p.name,
    p.cat,
    p.onumber,
    p.cid,
    p.cat1,
    p.pgroup,
    p.iv,
    splptr,
    order by rate desc
    Please guide me on what I need on urgent basis.

    Thank you

    Hello

    I have fixed the bothe insert and update now procs.

    Here's what I changed.

    Changed the sql report to render the rownum as the value for the column in the box.

    Edited the page processes to use the value of rownum.

    Please check and mark the correct answer

    Thank you

  • ORA-01461: can bind to a LONG value only for insert into a LONG column

    Hello

    Oracle XE on RHE dedicated server
    create table cvDetails(
    cd_id number(14) primary key,
    cv_id number(14) constraint education_fk references CvProperties(cv_id),
    nationality varchar2(230),
    objectives varchar2(3900),
    name varchar2(230),
    fatherName varchar2(230),
    motherName varchar2(230),
    dob varchar2(230),
    gender varchar2(230),
    mStatus varchar2(230),
    passportNo varchar2(110),
    email varchar2(230),
    phone varchar2(45),
    mobile varchar2(25),
    address varchar2(2500),
    state varchar2(230),
    zipCode varchar2(230),
    city varchar2(230),
    education clob,
    experience clob,
    skills clob,
    languages varchar2(1400),
    hobbies varchar2(3200),
    achievements varchar2(3900),
    references varchar2(3900)
    );
    
    create sequence cvDetails_seq
    start with 1 increment by 1;
    
    create or replace trigger cvDetails_trig
    before insert on cvDetails
    referencing new as new
    for each row
    begin 
    select cvDetails_seq.nextval into :new.cd_id from dual;
    end;
    /
    Why do I get the error of subject?

    Thank you in anticipation

    >
    in any case, I checked manually according to your instructions and found that this objective column is of character input more than specified.
    >
    Glad you found the problem, but I hope that you learned a lesson that is time consuming.

    It must be remembered that we have no access to your environment. If we do not know which servers, clients, tables and users that you use.
    It may seem simple to you but doesn't realize that you provide us with two slightly different versions of the cvDetails table.

    The original post had this
    >
    objectives varchar2 (3900).
    >
    But when you have provided your 'cvDetails desc' journal text has
    >
    OBJECTIVES VARCHAR2 (3950)
    >
    It is the same table that you started with how the column suddenly grow 50 bytes?
    This means that you did from different parts of the present in the two schemas or on two servers or you change the table between the two.

    You can't address properly when you do this. By chance it is the column that you said is now the problem.
    In SQL, the maximum length of a VARCHAR2 is 4000 bytes; no characters but bytes. Nothing more than 4000 bytes would probably be a LONG in the generic sense.

    If your error
    >
    Re: ORA-01461: can bind to a LONG value only for insert into a LONG column
    >
    means that you try to 'bind a LONG value' to a column VARCHAR2 and you can't you can 'bind a LONG value only for insert in a LONG column.

    In the proper context, the error makes sense.

    You probably have a problem with

     ps.setString(2,  objectives);
    

    because the 'objectives' has a length of more than 4000 bytes.

    Remember this answer from you?
    >
    I have read and found that there may be a problem with the driver JDBC or Characterset. Am I wrong?
    >
    The 'Hello' ASCII string is five characters and five bytes because the ASCII code is a set of characters in a single byte. The same string internally in Java is five characters but ten bytes because Java uses UTF16.

    So, if the character set of the data itself is double-byte character set then anything more than 2000 characters (4000 bytes) is a "LONG". And if your column is defined as VARCHAR2 (3950), which means bytes a doublel-byte character set which are characters of 1975.

    Then you said in a response later
    >
    I checked by the SNA Server and oracle that are both of the same but new thing I found is that oracle does not allow more than one clob column in a table. Is this true?
    >
    Somehow a hypothesis has crept it that the problem was not a driver JDBC or Charaterset, but because you can not have more than one clob column in a table.

    You could have easily tested for yourself by doing what P. Forstmann - tried to create a table and see.

    Then you completely ignored my advice
    >
    I suggest to you isolate the columns actually causing the problem.
    Change your code to insert only a few columns. When it works, add more than a few columns.
    This will then tell you which column or the columns are at the origin of the problem.
    Display the results once you determine a column that causes the error.
    >
    When you have finally made the simplest things, you have found what was causing the problem almost immediately.

    Many times you don't need 'experts' - you must use a rigorous, methodical, process step by step.

    ALWAYS, ALWAYS, ALWAYS reduce the simplest possible code example that illustrates the problem.
    If you had followed this a rule would have probably found you the problem and makes you look like the 'expert '.

    There are no shortcuts.

  • How the values to insert into the table with the command insertion

    Dear all
    can someone tell me how the values to insert into the table with the command insert, I want to say I always use command insert behind my forms on what shutter release button press the button of my save, but today I had a form of 6i, where controls (textbox, combo, etc.) are delineated with directly the table with I guess than the Properties Windows , I created 3 columns in tand 3 text on forms fields, now kindly tell me how to do this fields to fill and do not insert command, I mean directly defined with table column



    Please help me its urgent

    Hello

    If the block is based on your database table, just committed the shape, then changes will be applied to the database.

    François

  • A weird exception in 12 c (ORA-01461: can bind to a LONG value only for insert into a LONG column)

    I have a Windows application that accesses a database of 12 c Oracle via ODBC (driver version is 12.01.00.01).

    I have a table with a column of key named REGION_ID (NVARCHAR2 (9)) and a dozen other columns, of which three are named region1 and region.2 elle3, all of type NVARCHAR2 (40).

    When I try to insert a string in the scope of the region1 is longer than 9 characters (length of REGION_ID), I get an error ORA-01461 (' can bind to a LONG value only for insert into a LONG column). If I set the length of REGION_ID be NVARCHAR2 (15), so I can add channels to the region1 in length up to 15 field until I get ORA-01461 exception again. Curiously, if I change the name of column region1 to REGIONONE, I don't get any errors, and everything works fine. It's almost as if the column name region1 is being confused with REGION_ID backstage.

    Any ideas? I am using SQLBindParameter to bind the columns, and all calls are successful. I get the exception when I run the insert statement. This same code worked for previous versions of Oracle (9i, 10g and 11g). And if I use a driver of client 11g against the 12 c server, I do not receive the exception.

    Thank you!

    It is a component of ODBC driver bug in 12 c and it is fixed. You can download and install the fix for bug 18232462 or the last window for 12 c patch cumulative/bundle.

    Thank you

    Spengler

  • Insert into a table... with order by

    Oracle 10.2.0.3

    I want to insert into a table, records from another table ordered in a certain way. We want a specific order that we want the data grouped the disk.

    No idea why it does not work?
    create table test_a (
         id number primary key,
         value1 varchar2(20));
    
    insert into test_a (id, value1) values (1,'ccc');
    insert into test_a (id, value1) values (2,'bbb');
    insert into test_a (id, value1) values (3,'aaa');
         
    create table test_b (
         id number primary key,
         value1 varchar2(20));
    
    insert into test_b (id, value1) (select id, value1 from test_a order by value1)
                                                                   *
    ERROR at line 1:
    ORA-00907: missing right parenthesis     
    If I leave aside the order, it works fine...
    SQL> insert into test_b (id, value1) (select id, value1 from test_a);
    
    3 rows created.
    This does not work either:
    create table test_b as (select id, value1 from test_a order by value1)
                                                          *
    ERROR at line 1:
    ORA-00907: missing right parenthesis

    Lose the parenthesis.

    TUBBY_TUBBZ?create table test_b as select id, value1 from test_a order by value1;
    
    Table created.
    
    Elapsed: 00:00:00.02
    

    Or

    TUBBY_TUBBZ?
    insert into test_b select id, value1 from test_a order by value1;
    
    3 rows created.
    
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?
    
  • can I use create valude function for MSSql scalar and table.

    Hello

    (1) can I use create scalar function for MSSql and function table?
    (2) is there how many type of function defined by the user in oracle 11 g express?
    (3) and I can reture 'type' any form user defined function?


    Attract sincerely

    944768 wrote:

    the answer lies in a few cases only,

    The response illustrates the basic concept of how customers need to use cursors created using PL/SQL as a layer of abstraction - SQL and this concepts adapts to ALL cases where the customer wants to Oracle via PL/SQL cursor.

    a case is,
    If my function returns only a single value, then I can use oracle 'create function' with the return type as types predefined as a whole, varchar2 etc?
    with regard to performance.

    With regard to this performance problem? And why now suddenly change the question to want to use a function to return data type number or string? How does this relate to PL/SQL to return a cursor now?

    A function can return scalar values, not scalar. A function may return atomic values (such as a unique number, or a non-scalar list of numbers). A function can return a complex data structure consisting of scalar values, not scalar.

    However, in PL/SQL function must NOT be used to read the lines of the database to cache lines in a memory of the server PL/SQL (PGA), then back to the client.

    He does not. It does not fit. It is too bloody dangerous to the overall health of the server as such code plays silly blighters with very expensive server memory.

    A PL/SQL function can also be used as guideline, returning data via expensive PGA, but via the SQL engine instead and using its slider interface (which allows output data to be "gradual" and not to return all data with a single copy of croustilleur mass of the call stack) directly. IT IS, HOWEVER, AN EXCEPTION. There is very rarely the need to make the functions PL/SQL pipeline table - and is often victims of abuse and bad demonstrated with examples of absurd code here.

  • increase the value of minute in 14 minutes, while the data is inserted into the table

    Hello

    I'm having the asp page that connects with the DB to insert values into the table. One column is date data type. Value from this asp page must be incremented to 14 minutes before be inserted into the table.

    How can I do this?
    sqlG="INSERT INTO AEMU " &_
                                                      " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_
                                                      "  COUNTRY_G)" &_
                                                      " VALUES " &_
                                                      "('"& msid &"'," &_
                                                      "'" & X & "'," &_
                                                      "' " & Y & " '," &_
                                                      "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')," &_
                                                      "' " & req_id & " '," &_
                                                      "'" & CountryName_G & "')"

    Try this way:

    sqlG="INSERT INTO AEMU " &_
         " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_
         "  COUNTRY_G)" &_
         " VALUES " &_
         "('"& msid &"'," &_
         "'" & X & "'," &_
         "' " & Y & " '," &_
         "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')+14/(24*60)," &_
         "' " & req_id & " '," &_
         "'" & CountryName_G & "')"
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com]

  • Same question different results when insert into one table.

    Hello

    I have an insert statement as below.

    insert into mid_table_name
    Select seq.nextval key1, Field1, Field2,...)
    Select Field1, Field2 b.test2 a.test1...
    tab1 tab2 a and b
    where a.key1 = b.key1
    and...
    ...
    )

    When I run the present, it's inserting less files that actually, the subquery returns.

    I noticed that

    (1) when I run the subquery, illustrated below, it returns more than 60 lines of k which is what I expect.
    (select Field1, Field2 b.test2 a.test1...
    tab1 tab2 a and b
    where a.key1 = b.key1
    and...
    ...
    )

    (2) However, when I run including the outer query, showb below, it returns only about 8 k; the same is get inserted into the table.

    Select seq.nextval key1, Field1, Field2,...)
    Select Field1, Field2 b.test2 a.test1...
    tab1 tab2 a and b
    where a.key1 = b.key1
    and...
    ...
    )


    Any help will be greatly appreciated.

    Thank you
    Prep

    You can try this one.

    Select seq.nextval, ff.*
    Select * from)
    Select Field1, Field2 b.test2 a.test1...
    tab1 tab2 a and b
    where a.key1 = b.key1
    and...
    ...
    )
    FF

  • Attempt to create run time (dynamic) table and insert the data in this... The entrance is a flat file (txt file) which has the numbers and strings... I'm trying to convert them to a string and insert into the table. It is a matter of urgency for me please

    create or replace procedure Dynamic_Table AS

    iVal VARCHAR2 (32);

    iTemp varchar (200): = ";

    sql_stmt VARCHAR2 (200);

    l_file1 UTL_FILE. TYPE_DE_FICHIER;

    l_file utl_file.file_type;

    BEGIN

    l_file1: = UTL_FILE. FOPEN ('TEST', 'dinput.txt', 'R');

    EXECUTE IMMEDIATE ' CREATE TABLE baseline (Item_ID varchar2 (32))';

    Loop

    BEGIN

    UTL_FILE. GET_LINE (l_file1, iVal);

    EXECUTE IMMEDIATE ' insert into baseline values (: ival) "using ival;

    EXCEPTION

    WHEN No_Data_Found THEN EXIT;

    While some OTHER THEN dbms_output.put_line (SQLERRM); * /

    END;

    end loop;

    END;

    You are approaching this the wrong way.  Create an external table based on the file.  External tables are CSV, fixed width data in a queryable table.

    You will need to create an oracle directory to put the file in (MY_ORA_DIR) I leave it for you to do, and then perform the following...

    create table BASELINE)

    ITEM_ID varchar2 (32)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY MY_ORA_DIR

    ACCESS SETTINGS

    (

    RECORDS DELIMITED BY NEWLINE

    LOGFILE "dinput.log".

    BADFILE "dinput.bad."

    NODISCARDFILE

    FIELDS

    (

    ITEM_ID

    )

    )

    LOCATION ("dinput.txt")

    )

    REJECT LIMIT UNLIMITED

    /

    All the dubious records appear in dinput.bad. Dinput.log will give you information.

    External tables are read-only, so once you set up your file, you can create editable as a normal table.

    create table ITABLE_EDITABLE as

    Select * from BASELINE

    /

    Work done, a few lines of code.

Maybe you are looking for