Commiting Multiple Rows Programmatically

Hi,
I have a method that saves the multiple row after creating it. My code is like as follows. How to commit multiple rows by invoking getTransaction().commit() only once?
while ((line1 = is.readLine()) != null) {
//Row regionRow = regionVo1.createRow();
EntityDefImpl regionDef = SNIRegionEOImpl.getDefinitionObject();
SNIRegionEOImpl newRegion = (SNIRegionEOImpl)regionDef.createInstance2(regionApp.getDBTransaction(), null);
//regionRow.setAttribute("RgnId",1);
newRegion.setVersNum(new oracle.jbo.domain.Number(1));
newRegion.setRgnTypCd("PR");
newRegion.setEffStrtDt(new Date(Date.getCurrentDate()));
newRegion.setCreUsrDttm(new Date(new Timestamp(System.currentTimeMillis())));
newRegion.setCreUsrId("USER");
newRegion.setUpdUsrDttm(new Date(new Timestamp(System.currentTimeMillis())));
newRegion.setUpdUsrId("USER");
//newRegion.setPrntRgnId(new oracle.jbo.domain.Number(1));
newRegion.setCmntTxt("Pricing Region");
System.out.println("line = `" + line1 + "'");
Iterator e1 = csv.parse(line1).iterator();
int ctr = 0;
String regionLine = null;
while (e1.hasNext()){
if (ctr == 0){
regionLine = (String)e1.next();
newRegion.setRgnBasCd(regionLine);
if (ctr == 1){
String entry = (String)e1.next();
newRegion.setRgnNam(entry);
if(ctr == 2){
String commaSeparatedZipState = (String)e1.next();
newRegion .setRegionDefinitionText(commaSeparatedZipState);
newRegion.setGeoPoly((SdoGeometry)getAggregateRegionForZip3(commaSeparatedZipState,regionApp,regionLine).getAttribute("Pricingregiongeometry"));
ctr++;
try{
regionApp.getTransaction().commit();
catch(JboException ex){
regionApp.getTransaction().rollback();
throw ex;
}

Hi,
move the commit outside of your while loop (at the end). The commit is applied to the connection so all rows will be committed.
Brenden

Similar Messages

  • How to update multiple rows in one query using php

    i am new to this can any one help me how to update multiple rows at a time i am doing an school attendance page

    Often the situation is such that you have multiple courses across a range of dates.So students may take more than one course, and you need to track attendance for each course date. The following graphic demonstrates this:
    In such a situation, you need four database tables as follows:
    students (student_id, student_name, etc.)
    courses (course_id, course_name, etc.)
    students_courses (student_id, course_id)
    attendance (student_id, course_id, dater)
    A fifth table may also be needed to define the dates of courses, but you may also be able to build this array programmatically by using PHP's robust date functions, which can give you, for instance, all the Tuesdays and Thursdays between a start date and end date.
    The students_courses table simply keeps track of which students are taking which courses, so it has just two columns for the primary keys of both of the main tables. The attendance table is similar, but it also includes a date field. The following view of the attendance table demonstrates this:
    So if David's solution does cover your needs, consider yourself lucky, because this could quickly grow from a beginner-appropriate project to a moderately advanced one.

  • Multiple rows in post parameters

    I am using the XSQL servlet programmatically. The xsql page being processed attempts to include the request parameters using the tag <xsql:include-request-params />.
    I have found that when I pass in a dictionary of parameters with multiple values for a particular key (multiple row edit on the same page) I get the error detailed below. This, obviously, also occurs if you call XSQUtil.DictionaryOfParamsAsXMLDocument directly. However having multiple values works fine when using the XSQL Servlet on its own - a row tag is created for each record/row of multiple values.
    Is this an oversight in the XSQLUtil and XSQLHttpUtil classes?
    I think my only way forward is to write an action handler that retrieves the request parameters as XML and divides multiple values into rows. Is this correct?
    How does the XSQL Servlet handle the case where there are a varied number of duplicate values?
    [Ljava.lang.String;java.lang.ClassCastException: [Ljava.lang.String;
         oracle.xml.parser.v2.XMLDocument oracle.xml.xsql.XSQLUtil.DictionaryOfParamsAsXMLDocument(java.util.Dictionary)
              XSQLUtil.java:185
         org.w3c.dom.Document oracle.xml.xsql.XSQLPageRequestImpl.getRequestParamsAsXMLDocument()
              XSQLPageRequestImpl.java:217
         void oracle.xml.xsql.actions.XSQLIncludeRequestHandler.handleAction(org.w3c.dom.Node)
              XSQLIncludeRequestHandler.java:39
         org.w3c.dom.Document oracle.xml.xsql.XSQLDocHandler.getDocument()
              XSQLDocHandler.java:145
         void oracle.xml.xsql.XSQLPageProcessor.process()
              XSQLPageProcessor.java:146
         void oracle.xml.xsql.XSQLRequest.process()
              XSQLRequest.java:321
         void oracle.xml.xsql.XSQLRequest.process(java.util.Dictionary, java.io.PrintWriter, java.io.PrintWriter)
              XSQLRequest.java:216
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You're running into Bug# 2440949. The XSQL Servlet uses different implementations to render the results of the request parameters based on the environment that it's running in. If you use the XSQLRequest class, it's got a bug where it's not handling the Array-valued parameters in a programmatic request correctly.
    The bug's been fixed for the 10i version of the XSQL Servlet (current OTN XDK version is 9.2.0.2), but the only workaround in the interim is either to have your servlet forward the request to the XSQL Servlet using the request dispatcher object's forward() method, or to pass parameters with simple string values (and not array's of strings).

  • 2.1.0.62: Bug editing text columns in multiple rows using editor-window

    Hello Forum,
    I hope this is not a double post, but I did not come up with the right keywords to search for.
    So here is the bug/strange annoying behavior:
    When I edit multiple rows of a table using the extra edit-window, it shows the text of the previous row I edited and not the text of the actual row.
    Well, sounds quit complicated so I'll give an example:
    Suppose you have a table with two columns and two rows. One column is of type varchar2. Say it contains the values "one" and "two".
    Now I click into the row containing "one", open the extra-edit-window and change the value to "one-1".
    Then I click into the second row and also open the extra-edit-window. The window shows "one-1" instead of "two" as it should.
    This is very annoying because I don't have autocommit activated and when I edit a couple of clob fields, the editor just shows the text of the previous field. I have to say commit for every row in order not to scramble the contents of multiple fields. I have to use the edit-window because the inplace editor is not very useful when editing large texts.
    I observed this bug with varchar2 and clob fields but it may not be restricted to those.
    I run Windows XP and conect to Oracle 10.2.0.4
    Regards,
    dhalek

    Hello -K-,
    setting "Post edits on row change" indeed does prevent this bug, but leads to another problem:
    When I click the rollback-button, the table data is not reverted to its original state. In fact the changes are not commited, but rolling back, does not give the old data back. I can enter "rollback;" into the worksheet and then refresh the table data to show the old values but internally SQL Developer still thinks it has uncommitted changes in the table.
    I, for now, uncheck "Post edits on row change" and use the inplace editor wherever possible. That has some strange cursor bugs (sometimes puts the cursor to the end making it impossible to enter text in the middle of the field) but that does not affect other rows.
    Regards,
    dhalek
    Edited by: dhalek on 30.10.2009 15:08

  • Selecting multiple rows from List-component

    Hi
    Could someone give me an example how to programmatically select multiple rows from List-component?
    I know that this selects one row: lst_example.selectedIndex = 1;
    But how about selectin indexes 1,2 and 4 for example?

    selectedIndices
    A Vector of ints representing the indices of the currently selected item or
    items...
    var si:Vector.<int> = new Vector.<int>;
    si.push(1);
    si.push(2);
    si.push(4);
    list.selectedIndices = si;

  • Query for Multiple Rows as XML

    Ok I've seen this topic in the forums, but have failed to get this to work within my process. Basically I have a process that has a user fill out a form, and upon submittal the form writes it's information to a database (via a data connection within the form that invokes a separate process upon submittal.), once this is done the main process is invoked and it's first step is to query that same database and bring back the data in a lower (now exposed) portion of the form that contains certain fields that track the issue history. The query brings back the xml document and I store it in an xml variable (xml_output). I then take this information and use the Set Value object to assign the returned nodes values to the location fields in the form. This works if the query returns only one row. But once the form is moved beyond the initial Task Assignment, (first user), and query returns more than just one row, the added nodes to not show up on the form, i.e I still just get information about the first row in my form. From what I've read the form should be able to recognize the xpath expression, and bring back all the nodes, by in a sense using instance manager to create an instance for each node on the form. My question is how can I get this to work. Jasmin if your still out there... Help!
    Also We're using Adobe LiveCycle ES 8.0
    created the process using Workbench
    the form was reader enabled and saved as a dynamic PDF.
    Thanks
    Mike

    Ok have done the binding of the schema to the form, and I'm getting the information to flow as it's supposed to.  The problem I'm having now, (I know I'm having a bunch.) is that once I've placed the form into my process, and I use the set value operation to pre-fill information I get the form to flow, but the rest of the information that was previously filled in is blank.  So I have checked the variable and nothing wrong there.  It appears the problem is how I'm using the set value operation.  If I don't use the set value operation, the form retains it's information.  And if I use the set value by trying to set the subform value, the form retains it's information, but no pre-fill.  I'm going to try to be a little more detailed here.  The xml that is returned looks like this:
            0016-03-30
            Mike
            Public Works
            alone in the dark
            Type sleep
            -1
            Council
            FYI
            Important
    Flowed and positioned are actual subforms on the form that have their properties set as their names indicates.  The entire path is /form1/Page1/flowed/positioned .  The way I was able to get the form to flow correctly upon the injection of this xml data, was to bind the subforms in the form in this manner, positioned[*].  Designer didn't place the [*] for me so I had to do this myself.  But once I previewed the document, the form pre-populated and created the necessary number of subforms and placed information into the fields correctly.
    Now on the process side, I have created an xfaform variable that stores the form (bound to xsd.)  information, and another xml variable that stores the query return that looks like the xml listed above (has an xsd associated with it for navigating xpath).  My first operation performs the query (JDBC- Query Multiple Rows as XML) and stores it into the xml variable.  The next step of the process is the Set Value operation which is supposed to inject the xml data retrieved from the query into the form.  Initially I tried the an xpath similar to the following:
    /process_data/object/data/form1/page1/flowed/positioned = /xml_data/flowed/positioned.
    No dice.  On this one the form retains the information filled out by the user (didn't explain this earlier, the form is filled out first, and upon submittal the process starts.), but doesn't pre-populate the bottom part of the form.  Next I tried the following xpath:
    /process_data/object/data/form1/page1/flowed = /xml_data/flowed/positioned.
    This time it retained the form information which was filed in by the user, but the bottom part is becomes hidden!  Didn't understand this.  But I started to kinda think that I had to navigate he xpath in order to correctly inject the xml into the form.  That being said my next attempt was:
    /process_data/object/data/form1/page1 = /xml_data
    My thinking was that if on location, I stop at page1, the xml in the variable will allow it to navigate correctly through the form.  Well it worked, but too well.  The top part of the form is blank, but the bottom portion is pre-populated correctly.  Now I'm stuck.  Not sure how to get the rest of the information in the form.  I thought about creating variables form each of the fields and then re-populating them after the injection of xml, but that didn't seem practical.  I'm almost positive it's something I'm not doing correctly with xpath.  Anyway, thanks for all your help on this.
    Mike

  • Multiple Rows Update / Refresh Toplink Query when database trigger involved

    Hi everybody!
    I have two easy troubles for you; the platform is the same as the SRDemo Toplink version.
    1.     Multiple Rows Update: I want to update with mergeEntity method, multiple rows for an isolated table; that method receives a parameter that I try to bind with the iterator "dataProvider" but it only merges the first row, not all, any other combination returns an error.
    What I want to do is to have a form (like tabular forms in Apex) that lets me update multiple rows in a single page. ¿May anyone tell me how to do it?
    2.     Refresh Toplink Named Query: I have a list on a page with two columns. From another page, a button does an action that fires a database trigger that updates one of the columns on the list´s page. When I go back to the list, it is not updated; however, the CacheResults´s property is set to false on the iterator.
    Thanks in advance,
    Alejandro T

    I didn't use it (yet), but - you might take a look. You'll find a [url http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html]Timer plug-in on this page. It is a dynamic action which allows you to periodically fire other dynamic actions in the browser. For example use the timer to refresh a region every five minutes. You can perform any dynamic action you want using this infrastructure.So I was thinking: you might use it to run a dynamic action which would check whether something changed in that table (I suppose you'll know the way) (for example, a database trigger might set a flag in some table, timestamp or similar), and - if you find that something really changed - refresh the page.
    As I said, I never used it so that's pure theory. Someone else might know better, though.

  • Multiple rows insertion - need help

    Hello all,
    I need to insert multiple rows in a table with a single query and the number of rows is 269470.
    There are 3 columns in the table. One of the columns is determined by another sub query which returns multilple(269470) rows and the other 2 columns remain same for all.
    I came up with the following query but need a loop to make it run multiple time(269470 times).
    insert into EMLUSRRECV
    (user_id, storeent_id, receiveml)
    values
    ((select user_id from users where user_id not in (select distinct user_id from EMLUSRRECV) and CURR = 'USD' and rownum = 1), 11154, 1);
    Thanks in advance.
    Edited by: 924585 on Feb 20, 2013 7:19 PM

    924585 wrote:
    Hello all,
    I need to insert multiple rows in a table with a single query and the number of rows is 269470.
    There are 3 columns in the table. One of the columns is determined by another sub query which returns multilple(269470) rows and the other 2 columns remain same for all.
    I came up with the following query but need a loop to make it run multiple time(269470 times).
    insert into EMLUSRRECV
    (user_id, storeent_id, receiveml)
    values
    ((select user_id from users where user_id not in (select distinct user_id from EMLUSRRECV) and CURR = 'USD' and rownum = 1), 11154, 1);
    Thanks in advance.
    Edited by: 924585 on Feb 20, 2013 7:19 PMwhy not just:
    insert into emlusrrecv
    select user_id, 11154, 1
      from  users
    where user_id not in (select user_id from EMLUSRRECV)
    and CURR = 'USD' and rownum = 1)

  • Multiple rows Converge to Single row and join

    Hi Folks,
    I am facing a tricky challenge to join a table with multiple rows and converge into a single row (based on ID, period) and join with another table to get a single row. Let me explain.
    Table 1: DTL_TABLE (id, period, course, names, title, type)
    1 2010 mat john null null
    1 2010 mat jim null null
    1 2010 cam null officer null
    1 2010 cam null Prof null
    1 2010 phy null null Inclass
    1 2010 phy null null Online
    Join with
    Table 2: ID_TABLE(id, period, Loc, Dept, Code)
    1 2010 nj 101 CC.
    Output format (id, period, course, names, title, type, Loc, Dept, Code)
    result : 1 2010 mat,cam,phy john,jim officer,prof inclass,online nj 101 CC
    I have created all the DDLs and DMLs if that help. Kindly let me know if a Join SQL query is possible.
    Thank you,
    Aj
    CREATE TABLE DTL_TABLE
       ids      VARCHAR2 (10),
       period   VARCHAR2 (10),
       course   VARCHAR2 (10),
       names    VARCHAR2 (10),
       title    VARCHAR2 (10),
       TYPE     VARCHAR2 (10)
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'jim',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'john',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'kale',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'cam',
                 NULL,
                 'officer',
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'cam',
                 NULL,
                 'prof',
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'phy',
                 NULL,
                 NULL,
                 'inclass');
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'phy',
                 NULL,
                 NULL,
                 'online');
    COMMIT;
    CREATE TABLE id_table
       ids      VARCHAR2 (10),
       period   VARCHAR2 (10),
       loc      VARCHAR2 (10),
       dept     VARCHAR2 (10),
       code     VARCHAR2 (10)
    INSERT INTO id_table
         VALUES ('1',
                 '2010',
                 'nj',
                 '101',
                 'cc');
    COMMIT;

    Aj09 wrote:
    Hi Folks,
    I am facing a tricky challenge to join a table with multiple rows and converge into a single row (based on ID, period) and join with another table to get a single row. Let me explain.
    Table 1: DTL_TABLE (id, period, course, names, title, type)
    1 2010 mat john null null
    1 2010 mat jim null null
    1 2010 cam null officer null
    1 2010 cam null Prof null
    1 2010 phy null null Inclass
    1 2010 phy null null Online
    Join with
    Table 2: ID_TABLE(id, period, Loc, Dept, Code)
    1 2010 nj 101 CC.
    Output format (id, period, course, names, title, type, Loc, Dept, Code)
    result : 1 2010 mat,cam,phy john,jim officer,prof inclass,online nj 101 CC
    I have created all the DDLs and DMLs if that help. Kindly let me know if a Join SQL query is possible.
    SELECT TBL.id,
           DTLperiod,
           course,
           names,
           title,
           TYPE,
           Loc,
           Dept,
           Code
    FROM   ID_TABLE TBL,
           DTL_TABLE DTL
    WHERE  TBL.ID = DTL.ID
           AND TBL.PERIOD = DTL.PERIOD; it not good to use RESERVED WORDS like "ID" or "TYPE" as column names

  • The simplest way for plsql procedure to return multiple rows

    Hi,
    What is the simplest way for plsql procedure to return multiple rows (records). There are many combination of ways to do it but I am looking for a solution that is appropriate for plsql beginners. Many solutions use cursors, cursor variables, collections and more that kind of things that are complex on the face of it. Is it somehow possible to achieve the same with less effort?
    Sample query would be: SELECT * FROM EMPLOYEES;
    I want to use returned rows in APEX to compose APEX SQL(in that context plsql) report.
    It is enough to use just SELECT * FROM EMPLOYEES query in APEX but I want to use plsql procedure for that.
    Thank you!

    Hi,
    It depends :-).
    With +...that is appropriate for plsql beginners...+ in mind... it still depends!
    The list of techniques (ref cursors, cursor variables, collections, arrays, using explict SQL) you have referenced in your post can be made to work. but...
    +Is it somehow possible to achieve the same with less effort?+ Less effort : That needs to be defined (measured). Especially in the context of pl/sql beginners (who is a beginner?) .
    What is the level of "programming experience" ?
    What is the level of understanding of "Relational Result set" as processible in Oracle?
    If you are looking for
    Process_the_set_of rows_in APEX () kind of capabilitywhich "abstracts/hides" relation database from developers when working on relation database, it may not be the best approach (at least strategically). Because I believe it already is abstracted enough.
    I find REF CUROSOR most effective for such use, when the "begginer" has basic understanding of processing SQL result set .
    So in a nut shell, the techniques (that you already are familiar with) are the tools available. I am not aware of any alternative tools (in pure Oracle) that will simplify / hide basics from develpers.
    vr,
    Sudhakar B.

  • Query multiple rows

    Hi, need some help on XML and XSD.
    say I have a table in the database with 3 columns: a, b, c
    on my XDP form, I have a table, like a spreadsheet, with 3 columns too: x, y, z
    and it has 10 rows.
    I want to pre-fill the form with 10 rows of data,
    so, in my Process's action profile,
    I use JDBC's query multiple rows to get the first 10 records of my database table.
    how do I put these 10 rows of data into the table on my form?
    TIA for helping me.
    Happy New Year!

    Step1: Use SQL Query Multiple results as XML activity
    Step2: Define the output of SQL activity to look similar to
    <table>
        <row>row1 value</row>
        <row>row2 value</row>
        <row>row3 value</row>
        <row>row4 value</row>
        <row>row5 value</row>
        <row>row6 value</row>
        <row>row7 value</row>
        <row>row8 value</row>
        <row>row9 value</row>
        <row>row10 value</row>
    </table>
    Step3: arrange your forms fields (Table and rows) in the same way as mentioned above.
    Nith

  • Help me with returing multiple rows - Query

    I am trying to return multiple rows and i need help with my query.
    and most important of all one of the requirement is the following:
    SERVICE LEVEL has categories Sergeant, Bonus I, All Deputies, Deputy Bailiff, Deputy Lockup, Deputy Bailiff Security, Custody Assistant,
    Security Officer, Security Assistant, Security Officer and Security Assistant, Private Security, ALL, All Sworn)
    Note: Service Level “All Deputies” includes Deputy Bailiff, Deputy Bailiff Security and Deputy Lockup
    *“All Sworn”: includes Sergeant, Bonus I, All Deputies, Deputy Bailiff, Deputy Lockup, Deputy Bailiff Security*
    //this code doesn't work cuz  case- when statement return only one row. but it works for singles such as 'Sergeant'
    select *
    from in_service
    where rank IN (CASE TRIM(UPPER(:SL))
                    WHEN 'ALL DEPUTIES' THEN
                      (SELECT DISTINCT RANK FROM IN_SERVICE
                       WHERE UPPER(RANK) LIKE 'DEPUTY%')
                    WHEN 'ALL SWORN' THEN
                   (SELECT DISTINCT RANK FROM IN_SERVICE
                   WHERE UPPER(RANK) LIKE 'DEPUTY%' OR
                   UPPER(RANK) = 'SERGEANT' OR
                   UPPER(RANK) = 'BONUS 1')
                    WHEN 'ALL' THEN
                   (SELECT DISTINCT RANK FROM IN_SERVICE
                   WHERE UPPER(RANK) LIKE 'DEPUTY%' OR
                   UPPER(RANK) = 'SERGEANT' OR
                    UPPER(RANK) = 'BONUS 1' OR
                   UPPER(RANK) LIKE 'SECURITY%' OR
                   UPPER(RANK) = 'CUSTODY ASSISTANT' OR
                    UPPER(RANK) = 'PRIVATE SECURITY') 
                    end )   I was able to get multiple rows for 'ALL' and specified category like 'Sergeant' or 'Bonus I' from the code below, but NOT for 'All Deputies' for example which includes Deputy Bailiff, Deputy Bailiff Security and Deputy Lockup. I know CASE, WHEN does NOT return multiple rows, but i am having problems writing the query to make it work for all categories as the requirements mentioned above.
    WHERE RANK IN (SELECT RANK FROM (SELECT RANK, 'ALL' ALL_SERVICE
                                            FROM IN_SERVICE
                                            UNION ALL
                                            SELECT RANK, RANK
                                            FROM IN_SERVICE) WHERE ALL_SERVICE = :SL)Please help.
    Thanks in advance

    If you define your service_level as a table then it will be much easier.
    with service_level
    as
    select 'ALL' parent_lvl, 'Sergeant' srv_lvl from dual union all
    select 'ALL', 'Bonus I' from dual union all
    select 'ALL', 'Deputy Bailiff' from dual union all
    select 'ALL', 'Deputy Lockup' from dual union all
    select 'ALL', 'Deputy Bailiff Security' from dual union all
    select 'ALL', 'Custody Assistant' from dual union all
    select 'ALL', 'Security Officer' from dual union all
    select 'ALL', 'Security Assistant' from dual union all
    select 'ALL', 'Security Officer and Security Assistant' from dual union all
    select 'ALL', 'Private Security' from dual union all
    select 'All Deputies', 'Deputy Bailiff' srv_lvl from dual union all
    select 'All Deputies', 'Deputy Bailiff Security' from dual union all
    select 'All Deputies', 'Deputy Lockup' from dual union all
    select 'All Sworn', 'Sergeant' srv_lvl from dual union all
    select 'All Sworn','Bonus I' from dual union all
    select 'All Sworn','All Deputies' from dual union all
    select 'All Sworn','Deputy Bailiff' from dual union all
    select 'All Sworn','Deputy Lockup' from dual union all
    select 'All Sworn','Deputy Bailiff Security' from dual
    select *
      from in_service
    where rank IN (
              select srv_lvl
                from service_level
               where upper(parent_lvl) = upper(:SL)
                  or upper(srv_lvl) = upper(:SL)
                   )

  • Help :add multiple rows from Resultset to ArrayList ?

    My query returns one column and multiple rows. In Java code , I am trying to get this data in array or arraylist through ResultSet
    ex:
    item_num
    p001
    p002
    p003
    when I print, it only gets the item in the first row.
    ArrayList myArrayList = new ArrayList();
    resultset = preparedstatement.executeQuery();
    if (resultset.next())
    myArrayList.add(new String(resultset.getString("item_num")));
    Print:
    for (int j = 0 ; j < myArrayList.size() ; j++ )
    System.out.println((String)myArrayList.get(j)); --this prints only the first item.
    can someone assist ?

    changing if to while fixed it.

  • Return Code - Query for Multiple Rows as XML

    Hi,
    I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
    { call MyStoredProc(?) }
    This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
    Thanks
    Nic

    Thanks for the offer, unfortunately we would need something certified by Adobe.
    Nic

  • Splitting comma seperated column data into multiple rows

    Hi Gurus,
    Please help me for solving below scenario. I have multiple value in single column with comma seperated values and my requirement is load that data into multiple rows.
    Below is the example:
    Source Data:
    Product         Size                                 Stock
    ABC              X,XL,XXL,M,L,S                 1,2,3,4,5,6
    Target Data:
    Product         Size                                 Stock
    ABC              X                                     1
    ABC              XL                                   2
    ABC              XXL                                 3
    ABC              M                                    4
    ABC              L                                      5
    ABC             S                                        6
    Which transformation we need to use for getting this output?
    Thanks in advance !

    Hello,
    Do you need to do this tranformation through OWB mapping only? And can you please tell what type of source you are using? Is it a flat file or a table?
    Thanks

Maybe you are looking for

  • Problem with using CLIENT_GET_FILE_NAME fuction.

    Hi, i am using WebUtil with Oracle Application Server to migrate Forms6i on Forms10g i have got this problem, when i pressed the button to call the CLIENT_GET_FILE_NAME fuction. oracle.forms.webutil.file.FileFunctions bean not found WEBUTIL_FILE.FILE

  • Peoplesoft 9.2 Application and Tools 8.54 installation on Virtual Box Linux - Error

    I am trying to install Peoplesoft Demo database for Tools 8.54 with Application Fin 9.2, when i run the database setup to creat the script i get a file called fin92dmoora.dms, my question is does this file contain all the tables neccesary for tools t

  • Any solution for the Exchange "does not delete" / "does not expunge" bug?

    Other than using Synchronica, has any solution been found or released for the iPhone/Exchange bug where messages deleted on the iPhone are not deleted from the server (but rather just left there & shown as "read")?

  • Testing or postingmultiple messages in runtime workbench

    Hi, I want to know if  there is any shortcut to automatically post multiple messages say around 130 in runtime workbench at a time without clicking send message button for each message? let me know if any tools are available With Regards, Deepika.

  • Safari keeps crashing on me ... HELP!

    I have attached the error report I keep getting. Can anyone help? Please? Thanks! Process: Safari [1251] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 3.2.1 (5525.27.1) Build Info: WebBrowser-55252701~1 Co