Multiple INSERT's in executeUpdate()

Hey,
I have the folloowing code:
String str = "insert into TABLE (f1, f2, f3) values (1, 2, 3);";
str = str +  "insert into TABLE (f1, f2, f3) values (4, 5, 6);";
stm.executeUpdate(str);It returns an syntax error at SQLException.
I'm using MySQL.
Note that if I use only one query at str, it works fine, but it seems to have dificulties sending 2 commands to the database within one Statement.executeUpdate().
Any suggestions?
Thanks in advance!

this is what using PreparedStatement in a loop is born for. why don't you do that? batch them to cut down on network traffic. do they need to be transactional? (answer: probably)
i'll assume that TABLE is just an example. using keywords for table and column names is bound to cause trouble.
%

Similar Messages

  • Use Multiple Insert Statements in Prepared Statements

    Hi Friends
    i am stuck in a problem for which i need your help.i will brief you about the issue below.
    I am having Multiple Insert Statements which i need to execute to put the data in the database.i have a doubt about the use of the executeUpdate() function in the statement interface. sample code is as below.
    stmt = conn.prepareStatement("INSERT INTO Client ( clientPk, provincePk, countryPk, statusPk, branchPk, salutation, ) VALUES(PID, 2, '123123123', '123', '66', 1, 1 );");
    int n =stmt.executeUpdate();
    Now the problem is how do i insert multiple Insert statements using the conn.prepareStatement().should i do like
    stmt = conn.prepareStatement("")
    int n =stmt.executeUpdate();
    stmt = conn.prepareStatement("")
    int n =stmt.executeUpdate();
    stmt = conn.prepareStatement("")
    int n =stmt.executeUpdate(); ..................................
    should i use the same steps to execute each individual query and then use executeUpdate().
    Please let me know the correct procedure to be followed to execute these tasks.waiting for a positive reply from your side.
    Thanks & Regards
    Vikram K

    Hi
    Thanks a lot once agin for the reply.
    I think i have figured out the solution. I am using SQL statements in the Prepared statements(""). But now i have dropped the idea of using the prepared statement and decided to use the simple Statement instead.
    what i have done is as below.
    conn = ConnectionFactory.getInstance().getConnection();
    stmt = conn.createStatement();
    stmt.executeUpdate("INSERT INTO Client ( clientPk, provincePk, countryPk, statusPk, branchPk, salutation, heightMeasurementType, weightMeasurementType ) VALUES(PID, '1', '1', '0', '1', 'Mr', CONCAT('Jason ', PID), 'R', 'Mawdsley', '123', '66', 1, 1 );");
    stmt.executeUpdate("INSERT into Cp () Values ()");
    stmt.executeUpdate("INSERT into gp () Values ()");
    stmt.executeUpdate("INSERT into jk () Values ()");
    I think this makes sense to use the Statement and execute all the queries in one shot rather than using PS.
    thanks a lot for your help.
    Regards
    Vikram K

  • CLR trigger - handling multiple inserts at the same time

    Hi
    I've developed a CLR trigger which operates on inserts performed on a staging table. The trigger implements some business logic and then inserts or updates a record in a target table. Whether an insert or update is performed depends on whether
    a record with the same ID already exists in the target (i.e. a select * from target where ID = 123).
    This works fine in most scenarios, but occasionally I am getting duplicates in the target table and have noticed that this seems to occur when inserts on the staging table happen at exactly the same time (i.e. multiple inserts for the same ID at
    the same time). In this situation duplicates are created in the target table because at the time of the inserts, no record with that ID exists in the target table (i.e. the select returns no records), therefore a new record is created for each.
    Is there a known way to deal with this scenario? For example, would locking the target table on insert result in the subsequent selects against the target table waiting until the target table had been updated, therefore the select would return a record
    for the given ID.
    I didn't really want to lock the whole target table on insert, because there are potentially other users reading that table (selects) and these would also have to wait for the insert to complete.
    I'd appreciate any thoughts on how to deal with this and avoid duplicates in the target table. I'm unable to change the way the data is coming in to the staging table, so my trigger code must deal with the above scenario.
    Thanks in advance.
    John

    First if you do not want any duplicate values in a column (or combination of columns) you should add a constraint to ensure this is never possible. A
    unique index
    like this should do this trick.
    CREATE UNIQUE NONCLUSTERED INDEX [IX_yourIndexName] ON [dbo].[YourTableName]
    [yourColumn1] ASC,
    -- add more columns that make the unique combination that you don't want repeated
    You can then add a try/catch block in your trigger code, if you get an exception based on this index then the record was created by another executing instance of this trigger and in that case you should do an update (or not, not sure what the rest of your
    logic is) in your catch block. This is the easiest solution and does not involve table locks. The only drawback is the first one to commit the insert will win and you have no guarantee which process or data set that will be. Also i have no idea how big the
    table is, how frequently changes are made, and what the data type is so you should
    keep this in mind when creating your index so you don't run into unexpected high index fragmentation which can lead to performance problems when executing updates and inserts.
    You could also create a
    named transaction with scope serializable around your insert/update block and execute your reads using a
    NOLOCK hint
    which should allow them to retrieve uncommitted writes and not create a long wait. The downside is is that the data might not be 100% accurate depending on if a transaction fails or not if there happens to be an update at the same time as a select but maybe
    this is not a big deal to the calling code.
    -Igor

  • Multiple insert transaction for image uploads

    Hello !
    I can't figure it out how to connect multiple insert transactions on one page?
    For example - I want to upload images from page with different categories(have menu list) and insert by the one button all the images at once.
    image 1, cat 1
    image 2, cat 2
    image 3, cat 3
    button to insert
    Any Ideas? Where to start from?
    Thanks, Nick.
    Please help ! Maybe link for some tutorials?

    Hi Nick,
    What you are asking for is very possible to make with ADDT but if you are totally unfamiliar with ADDT you should probably go over the manual to go over the many functions that ADDT offers. You can find the manual two ways.
    1. After you have created your site and created one blank page you can open the page to have the Developer Toolbox Tab un-greyed out. Then you can click on the last icon (Control Panel) and press the help button.
    That will open up the manual.
    2. Go to: http://help.adobe.com/en_US/Dreamweaver/10.0_ADDT/help.html?content=MXK3_052000_MX_K3_con trol_panel.htm
    Same place the help button takes you.
    Yes, Waleed is having hosting issues that I think he is sorting out.

  • Executing multiple insert statement in oracle

    hellor every one,
    I have multiple insert statements which should be executed in a single execution and i placed the sample insert statement here. How can i execute these statement in a single execution. Please help me.
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',1,'04509','Abdomen pain');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',2,'04509','Abdominal bloating');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',3,'04509','Abdominal cramps');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',4,'04509','Abdominal pain');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',5,'04509','Abdominal sensitivity');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',6,'04509','Abnormal bleeding');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',7,'04509','Abnormal weight gain');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',8,'04509','Abnormal sensitivity to cold');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',9,'04509','Abnormal sensitivity to heat');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',10,'04509','Abnormal movements');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',11,'04509','Absence of menstrual periods');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',12,'04509','Absence of periods');\
    insert into r_symptom_master_tcs (RSM_CRT_DT,RSM_SYM_CD,RSM_CRT_UID,RSM_SYM_DESC) values('30-Sep-2005',13,'04509','Absent menstrual periods');\

    > but in what editor we should do this, either in the sql editor, or pl/sql
    Whatever editor you are comfortable with. I assume there is one.
    btw if there are a lot of INSERT statements in the script it might be worth adding the following to the top:
    ALTER SESSION SET CURSOR_SHARING = SIMILAR;

  • Creating Multiple INSERT statements with SQL

    is there a way to create multiple INSERT staements with SQL .
    Example scenario : This is only example but i have lot of data in the real time.
    sql : Select Emplid from Table A where Emplid between 100 and 350 will retun me 50 rows . i want to insert those rows into another table.
    I am looking for output like below instead of Giving output just as EMPLIDs
    Insert into PS_LM_DATA ( EMPLID ) values ( 123 )
    Insert into PS_LM_DATA ( EMPLID ) values ( 234 )
    Insert into PS_LM_DATA ( EMPLID ) values ( 334 )
    and so on....
    thanks ,
    Karu

    If you are inserting into another table, you could use
    insert into PS_LM_DATA ( EMPLID ) 
    select Emplid from Table A where Emplid between 100 and 350Example:
    SQL> insert into emp2(empno) select empno from emp;
    14 rows created.
    SQL> insert into emp2(empno) select empno from emp where empno between 7369 and 7788;
    8 rows created.

  • Multiple insert row.

    Hi all,
    I have a table "Test" with the following column "X", "X2" and "X3". In apex a form on a table is created and I want
    to do a multiple insert on that table. Can anyone help me with this problem???

    I think you are thinking of a Tabular Form?..
    Just try to create one of those (using the wizard) on your "test" table.
    Or should every insert be duplicated? (Why??). You can do that by just creating another DML process in your Form.

  • Multiple inserts and upadates in tables through procedures

    how to do multiple inserts and updates of tables through procedures

    Hi,
    Not sure what you mean by 'multiple', without an example....
    You could perhaps use [merge | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#i2091840] ?
    Or perhaps you could use [multitable inserts | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#i2125362] ?

  • Create multiple Insert statements from multiselect list

    I want to thank everyone in advance for the help on this one.
    I have a multiselect list that I would like to use to create multiple Insert statements. I would like to then take those statements and execute them against the database, thus inserting the records. My thoughts are below;
    1.     Customer selects multiple items in the list
    2.     Clicks the submit button
    3.     onclick event walks through the string created by the multiselect list and creates the Insert statements by walking through an array of the values.
    4.     the Insert statements get executed against the database
    5.     page redirects to the proper page after the process is done.
    I actually have already created a javascript function that will use the split command on the string to create an array. I then get the length of the array and walk through a loop creating the sql statements. I am not sure what to do from here. How can I get the sql to execute.
    I am not wed to this approach. If there is a better idea out there please do not hesitate to share it with me. I am relatively new to APEX and have not done much work in pl/sql or javascript. But I learn fast, so don’t hold back.
    Thanks again and please let me know what questions you have for me.
    Derek.

    I setup the demo app on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=26255:3
    Login as demo / demo
    Go to the "products" tab. There is a Test region with a multiselect list. It shows product names (with product id's) from the demo_product_info table.
    When you select multiple things from the list and click apply, it uses the following procedure to simply insert a new record for each into the product table. It increments the product_id by 1000 and prepends "DUPLICATE " to the product_name:
    declare
    cursor c_products is
    select product_name, product_id
    from demo_product_info
    where instr(':' || :P3_X || ':', ':' || product_id || ':') >= 1
    order by 1
    begin
    for r_product in c_products loop
    insert into demo_product_info (product_id, product_name)
    values (r_product.product_id + 1000, 'DUPLICATE ' || r_product.product_name);
    end loop;
    end;
    You can see that is working by using it on the duplicate entries themselves.
    -Richard

  • Problem in multiple inserting

    Hello!
    I'm trying to code a multiple inserting to the object.
    I'm building a master-detail page, where Master table is the Order, and the Detail page is the Nomenclature + number of nomenclature position in appropriate order.
    It's very comfortable to add to the order's specification many nomenclature at once. To code this action, I created another page, where a Tree-table element contained all Nomenclature data whith tableSelectMany element. I also created a button which must perform the multiple inserting to OrderDetail table and bind to this one such a code:
    public String saveButton_action() {
    BindingContainer bindings = getBindings();
    Set rowSet = tableInfraction.getSelectionState().getKeySet();
    Iterator rowSetIter = rowSet.iterator();
    DCIteratorBinding nomen =
    (DCIteratorBinding)bindings.get("NomenclatureView1Iterator");
    while (rowSetIter.hasNext()) {
    Key key = (Key)rowSetIter.next();
    nomen.setCurrentRowWithKey(key.toStringFormat(true));
    Long NomenToCreate = (Long)shRow.getAttribute("rn");
    OperationBinding operationBinding =
    bindings.getOperationBinding("createOrderDetail");
    Map params = operationBinding.getParamsMap();
    params.put("nNomen", NomenToCreate);
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    rowSet.clear();
    return "back";
    I supposed to call Nomenclature page from an Orders page, select there necessary nomenclature positions and clicking the button perform action to create a multiple OrderDetail rows.
    But clicking the button returns the next error:
    javax.faces.FacesException: #backing_acts_CreateAudOrderDet.saveButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: java.util.Collections$UnmodifiableRandomAccessList     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)     at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)     at oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)     at oracle.adf.view.faces.component.UIXTree.broadcast(UIXTree.java:181)     at oracle.adf.view.faces.component.UIXTreeTable.broadcast(UIXTreeTable.java:322)     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: java.util.Collections$UnmodifiableRandomAccessList     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)     ... 30 moreCaused by: java.lang.ClassCastException: java.util.Collections$UnmodifiableRandomAccessList     at oracle.revision.userinterface.backing.acts.CreateOrderDet.saveButton_action(CreateAudOrderDet.java:248)     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:585)     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126).
    This error doesn't take place when I use not Tree-table, but a simple table to select nomenclature positions, which I need in.
    Please, give me an advice to solve this problem.

    Hi,
    First of all , dont write database update statements inside LOOP
    SELECT MANDT BUKRS GJAHR HKONT SHKZG PSWBT
           FROM BSEG
           INTO TABLE itab1
      WHERE BUKRS IN PBUKRS AND GJAHR IN PGJAHR AND VALUT IN PVALUT.
    SORT ITAB1 BY HKONT.
    LOOP AT ITAB1.
    INSERT INTO ZTAB21 VALUES itab1.   " should be before loop
    WRITE:/ ITAB1-HKONT,ITAB1-SHKZG,ITAB1-TAMT.
    ENDLOOP.
    For using same itab for direct insert, Custom table ZTAB21 should have field names same as BSEG.
    Else, you have to write as below:
    LOOP AT ITAB1.
    wa_ztab21-tfield1 = itab1-bukrs.
    append wa_ztab21 to i_ztab21.
    WRITE:/ ITAB1-HKONT,ITAB1-SHKZG,ITAB1-TAMT.
    ENDLOOP.
    MODIFY ZTAB21 FROM TABLE i_ztab21.
    Regards,
    Nisha Vengal.

  • How to optimize multiple inserts at runtime?

    Hello, guys,
    I have problem of optimizing multiple inserts at runtime using pro* C. The execution has the following form:
    for(int i = 0; i < 100000; i++)
    EXEC SQL EXECUTE IMMEDIATE :QUERY [ i ];
    EXEC SQL COMMIT WOK;
    The QUERY strings are only to be known at runtime, and all of them are to insert into the same table with different VALUES clauses, e.g.
    "INSERT INTO NSMALL (AN,DU,DE,AD,F1,F2,F3,F4,CAL,TYP,TS,TC,TSL,TCE,PC,RDU,ASD,AF,NETIDENT,ES,EF,LS,LF) VALUES('1',1,0,'','','','','','','',NULL,NULL,NULL,NULL,0,0,NULL,NULL,'',TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD'),TO_DATE('19760101','YYYYMMDD')) "
    I have tried to concategate the queries with ';', enclose them with "begin ... end", and execute them as a single SQL, but got less than 10% improvement(100 inserts/batch)
    Host array and FORALL clause could not been used in this usecase since the table is not known until runtime.
    So I have no idea about this problem, could any one tell me how to optimize?
    Thank you very much!

    You are sending 100,000 insert statements to the database.
    If you want better performance, then send only 1 statement that inserts 100,000 rows.
    So get rid of the for-loop and issue this one instead:
    insert into nsmall
    ( an
    , du
    , de
    , ad
    , f1
    , f2
    , f3
    , f4
    , cal
    , typ
    , ts
    , tc
    , tsl
    , tce
    , pc
    , rdu
    , asd
    , af
    , netident
    , es
    , ef
    , ls
    , lf
    select '1'
          , 1
          , 0
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , null
          , 0
          , 0
          , null
          , null
          , null
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
          , to_date('19760101','yyyymmdd')
       from dual
    connect by level <= 100000Regards,
    Rob.

  • Package with multiple inserts

    I am new to packages. I know how to do selects, but not inserts. I need to do inerts to multiple tables. One table I need to do to multiple Inserts. Is there a good example of this anywhere?

    Let me lay this out. There is another piece.
    first table..
    table1id name
    1 cars
    2nd table
    table2id table1id carMake
    1 1 Ford
    2 1 Chevy
    3 1 Honda
    3rd table
    table3id table2id carModel
    1 1 Mustang
    2 1 Tarus
    3 1 F-150
    4 2 Impalla
    5 2 Corvette
    6 2 Caviler

  • Multiple delete linked to multiple insert

    Hello folks!
    I'm developing a CMS and using ADDT to build most of the database operations. I'm registering user's activities in a db table. After each insert, update or delete, I link the requested transaction to an insert transaction to register it in my "changes" table. I'm having a little problem with linking multiple transactions. When I link a multiple delete, for example, to a multiple insert transaction in my detail page, they end without registering values in my tables. No errors are shown. I thought maybe an ADDT hero around could give me a hand and also this scenario could bring good ideas to others.
    The dynamic list sends the url variables correctly (detail.php?id=1&id_1=2.. etc). The delete transaction are trigged by the "KT_delete1" form variable. I presume it is been passed as the transaction finish and I'm redirected as I should (the url gets the "transaction=deleteTxt" variable). Here's my code:
    //start Trigger_LinkTransactions trigger
    function Trigger_LinkTransactions_del(&$tNG) {
    global $ins_alteracoesDelete;
    $linkObj = new tNG_LinkedTrans($tNG, $ins_alteracoesDelete);
    $linkObj->setLink("altFKey");
    return $linkObj->Execute();
    //end Trigger_LinkTransactions trigger
    // Make an instance of the transaction object
    $del_textos = new tNG_multipleDelete($conn_equylybraCMS);
    $tNGs->addTransaction($del_textos);
    // Register triggers
    $del_textos->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1");
    $del_textos->registerTrigger("AFTER", "Trigger_LinkTransactions_del", 98);
    $del_textos->registerTrigger("ERROR", "Trigger_LinkTransactions_del", 98);
    $del_textos->registerTrigger("END", "Trigger_Default_Redirect", 99, "listar.php?modulo=Textos&categoria={GET.categoria}&transaction=deleteTxt");
    // Add columns
    $del_textos->setTable("inscricoes_pagamentos");
    $del_textos->setPrimaryKey("pgtNumInscricao", "NUMERIC_TYPE", "GET", "txtID");
    // Make an insert transaction instance
    $ins_alteracoesDelete = new tNG_multipleInsert($conn_equylybraCMS);
    $tNGs->addTransaction($ins_alteracoesDelete);
    // Register triggers
    $ins_alteracoesDelete->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "");
    // Add columns
    $ins_alteracoesDelete->setTable("alteracoes");
    $ins_alteracoesDelete->addColumn("altUsuario", "NUMERIC_TYPE", "POST", "altUsuario");
    $ins_alteracoesDelete->addColumn("altTipo", "NUMERIC_TYPE", "VALUE", "3");
    $ins_alteracoesDelete->addColumn("altDescricao", "STRING_TYPE", "VALUE", "Excluiu texto - {POST.txtTituloDelete}");
    $ins_alteracoesDelete->addColumn("altFKey", "NUMERIC_TYPE", "VALUE", "");
    $ins_alteracoesDelete->setPrimaryKey("altID", "NUMERIC_TYPE");
    * To makes it easier: "alteracoes" means "changes" and "textos" means "text" in my language (portuguese)

    There are a few ways:
    Google Disjointed rollovers
    Set Text of Layer
    Swap Image in the Behaviors Panel
    Hope this helps
    Jo
    "serestibi" <[email protected]> wrote in
    message
    news:fpgc4m$9tj$[email protected]..
    > Hi, i am a beginner, so go eazy on me,
    > I am trying to link multiple images (thumbnails) to one
    big picture frame.
    > So if you click the thumbnails, each will blow up in the
    same frame.
    > The easy solution would be to link to a table, but it
    doesn`t seem
    > linkable.
    > I tried different slide viewers but I cant personalize
    them enough.
    > Please sombody help me!
    >

  • How: multiple insert stmt's in Database Express edition SQL commands GUI?

    I have installed the Express 10g version today and played around with it for a while.
    If I go to the SQL commands GUI and enter one insert like this:
    INSERT INTO pageit (PagID, PagParent, PagName, PagActive) VALUES (19, 17, 'Mango tree', 1)
    then it works nicely:
    But if I do this:
    INSERT INTO pageit (PagID, PagParent, PagName, PagActive) VALUES (20, 17, 'Grape trees', 1);
    INSERT INTO pageit (PagID, PagParent, PagName, PagActive) VALUES (21, 16, 'Animals', 1);
    Then it says:
    ORA-00911: invalid character
    Looks like semicolon is not allowed,
    but if I remove the semicolon then it says;
    ORA-00905: missing keyword
    Is there a way to use multiple insert statements in one go in this GUI at all?
    If not, could someone please recommend how I do this.
    I have exported thousands of insert lines from MySql and I would like to get them into my newly created Oracle table without having to type one line at the time in this gui.
    Any suggestions?
    Then if there is a nice WEB GUI like phpmyadmin for Oracle then I would like to know about that to? (Preferably free)

    I've not done a lot with the express edition, so there may be tools I'm not aware of. There is a dedicated Express Edition forum that may be more helpful for some of these questions.
    I would normally use the command-line SQL*Plus to run a script with a large number of SQL statements. I'd generally prefer, though, to get a comma-separated data file from the other system and load that into Oracle using SQL*Loader for efficiency reasons.
    In Oracle, you would normally only want a single database on a single physical machine. I know in SQL Server that what they call a "database" is roughly equivalent to a "schema" in Oracle, which is created by creating a new user.
    Justin

  • Stored procedure for exec. multiple insert queries

    Hello everybody,
    I am running on
    select banner from v$version;
    Output:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    I am a new to oracle and I need some help.
    I have to populate a table on monthly basis, for which I am required to run 20 queries.
    All queries retrieve data from the same table in another schema.
    I need to schedule a SP in order to be able to run all these queries.
    Till now, I have built separate SPs for the queries Proc_1, Proc_2, Proc_3, ..., Proc_20 and a final big SP (*main_sp*) which calls these SPs.
    Being that I have to change the date value for every month (I am doing it manually every single month), for every single query,
    I was wondering if there is a way to include all these queries in a single stored procedure.
    I am reading here execute parallel queries
    but I do not want to create 20 jobs.
    I found this topic, which seems to be interesting too, but I have never done this before:
    Executing multiple SQL scripts in a batch
    Moreover, how can I manage to insert the value of date only once (e.g in the main_sp) and every queries gets this value automatically.
    P.S.
    All queries retrieve data from the same table in another schema and fill in with data the same table in actual schema.
    insert into destin_tbl
    select from source_tbl@dbb_link
    Here is how my actual work looks like:
    First, I have built 20 sp, for each and every query:
    CREATE OR REPLACE PROCEDURE "SP_1" (
    START_DATE out DATE,
    IS
    BEGIN
    START_DATE := SYSDATE;
    insert /*+ append nologging parallel(x,4)*/into destin_tbl x
    select /*+ parallel(a,4)*/ field_1, field_2, field_3
    from source_tbl@dbb_link a
    where a.date_key >= 20101201 and a.date_key < 20100101 -- full month (december 2010) here
    and other conditions
    commit;
    END SP_1;
    = = = = = =
    CREATE OR REPLACE PROCEDURE "SP_2" (
    START_DATE out DATE,
    IS
    BEGIN
    START_DATE := SYSDATE;
    insert /*+ append nologging parallel(x,4)*/into destin_tbl x
    select /*+ parallel(a,4)*/ field_1, field_2, field_3
    from source_tbl@dbb_link a
    where a.date_key >= 20101201 and a.date_key < 20100101 -- full month (december 2010) here
    and other conditions
    commit;
    END SP_2;
    CREATE OR REPLACE PROCEDURE "SP_20" (
    START_DATE out DATE,
    IS
    BEGIN
    START_DATE := SYSDATE;
    insert /*+ append nologging parallel(x,4)*/into destin_tbl x
    select /*+ parallel(a,4)*/ field_1, field_2, field_3
    from source_tbl@dbb_link a
    where a.date_key >= 20101201 and a.date_key < 20100101 -- full month (december 2010) here
    and other conditions
    commit;
    END SP_20;
    I change the values for the date_key field every month I need to insert data, before I run the main_sp:
    CREATE OR REPLACE PROCEDURE "main_sp" (
    START_DATE out DATE
    IS
    BEGIN
    sp_1(START_DATE);
    sp_2(START_DATE);
    sp_3(START_DATE);
    sp_20(START_DATE);
    END main_sp;
    /

    You would need to pass a parameter to the main procedure and to all of the sub procedures. I would do it somethign like this. The main procedure takes a single date parameter the way I have structured it here, any date in the month you are interested in will do
    PROCEDURE main_sp(p_date IN DATE)
       l_st_dt  VARCHAR2(8);
       l_end_dt VARCHAR2(8);
    BEGIN
       l_st_dt := TO_CHAR(TRUNC(p_date, 'Mon'), 'yyyymmdd');
       l_end_dt := TO_CHAR(LAST_DAY(p_date) + 1, 'yyyymmdd');
       sp_1 (l_st_dt, l_end_dt);
       sp_2 (l_st_dt, l_end_dt);
    END;Then your individual procedures would look something like:
    PROCEDURE SP_1 (p_st_dt  IN VARCHAR2,
                    p_end_dt IN VARCHAR2) IS
    BEGIN
       insert /*+ append nologging parallel(x,4)*/into destin_tbl x
       select /*+ parallel(a,4)*/ field_1, field_2, field_3
       from source_tbl@dbb_link a
       where a.date_key >= p_st_dt and a.date_key < p_end_dt -- full month (december 2010) here
         and other conditions
       commit;
    END;
    Regarding the queries...they do not change only in the conditions statement, but also in the retrieve.
    I have 2 constant fields, whose value changes based on conditions (e.g. query_1 retrieves data regarding diesel car >speed => constant_field_1 = 'Diesel|_Car_Speed' ... query_2 retrieves data related to motorbike unleaded speed >=> constant_field_1 = 'MotorB_UL_Speed'.
    These makes the grouping of these queries impossible.Without seeing actual queries, it is impossible to say, but my guess would be that the 20 queries could be reduced to a single query, or at least less than 20. Something like:
    insert into destin_tbl x
    select CASE WHEN condition that indicates car THEN 'Diesel|_Car_Speed'
                WHEN condition that indicates motor bike THEN 'MotorB_UL_Speed'
                WHEN other conditions THEN other field1 values END
           field_2, field_3
    from source_tbl@dbb_link a
    where a.date_key >= p_st_dt and
          a.date_key < p_end_dt
      and other conditionsThe conditions for the CASE statement could be pulled out of the where caluses for the individual queries.
    John
    Edited by: John Spencer on Jan 24, 2011 9:37 AM

Maybe you are looking for

  • Problem in Jabber Softphone (CSF)

    Hello All, I am currently deploying Call Manager 8.6.1 with Presence 8.6.4. I managed to log in successfully into Jabber. However, I cannot activate the softphone feature. I have created CSF in Call Manager and gives the end user (which is used to lo

  • Video chat ended with error -8

    I'm trying to video chat with relatives (not computer savvy) who are using AIM on a Windows XP computer. We can see each other on our buddy lists, and can send and receive each other's invites, but neither can successfully accept. We tried repeatedly

  • How to create header item

    Hi all,     i have a requirement wher to create a header item which has no pricing and have 3 sub items have pricing individually,    wher customer will order the material as a kit.what condition should be used and which item cat. should be used.pls

  • SPA509G Phone won't reg1ster with UC320W

    I am having trouble getting a phone to register with UC320W. To eliminate extra issues, I have the phone locally powered plugged directly into one of the ports of the UC320W. The phone gets a DHCP address and I can web into the phone. Within the phon

  • No signal abroad

    I cannot get a signal in France I have tried turning off and back on, removing the sim and manully selecting the carrier - all failed