How to insert all the records using below loop

I am iterating value from hash map and store the values in database.
Below loop structure, the values from hashmap are inserted fine.
But inside while(rs.next()),first record from db only inserted for all the records
while(itr.next()){
Integer key=(Integer)iterator.next();
String Value=(String) orderNumberMap.get(key);
while(rs.next()){
String firstName=rs.getString("fname");
String lastName=rs.getString("lname");
insert into tbl values('"+key+"','"+Value+"','"+fname+"','"+lname+"');
Regards

Thanks for ur reply. The below is a scenario
I am having 3 records in a resultset
firstname= shadik
lastname frank
firstname= felix
lastname sha
firstname= williams
lastname= scoot
To insert above records with key, values retrieved from hashmap as follows
Number 1
empid 101
Number 2
empid 102
Number 3
empid 103
I need to insert above values in a table and expect a output as follows..
Number empid firstname lastname
1 101 shadik frank
2 102 felix sha
3 103 williams scoot.
But output will be displayed as follows
Number empid firstname lastname
1 101 shadik frank
2 102 shadik frank
3 103 shadik frank.
Values from HashMap are inserted fine. But retriving from resultset shows only first records for all the rows.

Similar Messages

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Periodic Alert-How to send all the records returned from the SQL in a mail?

    Hello all,
    I have defined a Periodic Alert, my SQL query returns more than one record whenever I run it. I also defined an action to send an email with the message consisting of the output variables from the SQL. Whenever i run this alert, a mail is being sent for every single record returned from the query. But i want to send a single mail containing all the records information that my SQL query returns.
    For Example: My SQL query lists all the users created on current date.
    Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
    from fnd_users where trunc(creation_date) = trunc(sysdate)
    Now i want to send a mail with all the users information from the above query, to SYSADMIN. How can this be achieved?
    Thanks & Regards
    chakoo

    Hi Chakoo,
    If the Periodic Alert is not working as requried. You can write a simple package with 3 procedures to implement the writing output to a out file and simultaneuosly send email to multiple receiptents.
    Example:
    Create Package xx_pac
    Create public Procedure P1
    begin
    Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
    from fnd_users where trunc(creation_date) = trunc(sysdate)
    fnd_file.put_line (fnd_file.output, &OUTPUT1, &OUTPUT2);
    end;
    (Create private Procedure P2
    begin
    ---Write the email package using the UTL_SMTP approch. Using this approch you can send the procedure P1 output file as an attachment to the desiginated receiptents.
    end;
    (Create public Procedure P3
    begin
    ---call the procedure P1 using the "g_request_id = fnd_request.submit_request"
    ---Wait for the above procedure to complete using "l_conc_status := fnd_concurrent.wait_for_request" procedure.
    ---call the procedure P2. (When called you must provide the correct to, from address)
    end;
    end;
    Register the Package xx_pac as a concurrent program and schedule when submit it from the request.
    Regards
    Arun Rathod

  • How to fetch all the records from ztable

    Hi 
    My program is outbound program.
    According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
    How to fetch the records.Please suggest me.
    Thanks,
    Neelima

    HI,
    Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
    You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'.

  • Inserting all the records in particular period

    Hi.,
    I am using jdev11.1.5
    I had created a reccustdocEO and its corresponding VO with the following querry This VO doesnot displayd in the UI
    SELECT RecCustDocHdEO.RCDOC_BU,
           RecCustDocHdEO.RCDOC_PFX,
           RecCustDocHdEO.RCDOC_DOC_TYPE,
           RecCustDocHdEO.RCDOC_DOC_MODE,
           RecCustDocHdEO.RCDOC_DOC_NO,
           RecCustDocHdEO.RCDOC_PLNT,
           RecCustDocHdEO.RCDOC_CUST_ID,
           RecCustDocHdEO.RCDOC_DOC_DATE,
           RecCustDocHdEO.RCDOC_DOC_YEAR,
           RecCustDocHdEO.RCDOC_DOC_PERIOD,
           RecCustDocHdEO.RCDOC_BANK_ID,
           RecCustDocHdEO.RCDOC_CURRENCY,
           RecCustDocHdEO.RCDOC_EXCHANGE_RATE,
           RecCustDocHdEO.RCDOC_TOT_AMT,
           RecCustDocHdEO.RCDOC_CUST_REFERENCE,
           RecCustDocHdEO.RCDOC_CUST_REFERENCE1,
           RecCustDocHdEO.RCDOC_START_YEAR,
           RecCustDocHdEO.RCDOC_START_PERIOD,
           RecCustDocHdEO.RCDOC_LAST_PROC_YEAR,
           RecCustDocHdEO.RCDOC_LAST_PROC_PERIOD,
           RecCustDocHdEO.RCDOC_FREQUENCY,
           RecCustDocHdEO.RCDOC_PROC_NO,
           RecCustDocHdEO.RCDOC_PROC,
           RecCustDocHdEO.RCDOC_STATUS,
           RecCustDocHdEO.RCDOC_CRE_BY,
           RecCustDocHdEO.RCDOC_CRE_DATE,
           RecCustDocHdEO.RCDOC_UPD_BY,
           RecCustDocHdEO.RCDOC_UPD_DATE,
           RecCustDocHdEO.RCDOC_REC_TYPE,
           RecCustDocHdEO.RCDOC_LAST_PROC_DATE,
           RecCustDocHdEO.RCDOC_PLANT,
           RecCustDocHdEO.ROWID
    FROM REC_CUST_DOC_HD RecCustDocHdEO
    WHERE RecCustDocHdEO.RCDOC_STATUS = 'P'
    ORDER BY RecCustDocHdEO.RCDOC_DOC_YEAR,RecCustDocHdEO.RCDOC_DOC_PERIODconsider the table contains datas such as
    year        Period   Docno
    201011     2         1125556
    201011     2         5689898
    201011     3         5689444
    If the user clicks the button all the records in period2 should get inserted to another table gljrnlhd
    Pls verify the link if i am not clear
    http://www.4shared.com/photo/OK1hXBsW/E008.html

    Hi,
    To copy the values from one view object to another you can use a method in the application module that will be called when the button is clicked.
    The code in the method could be something like:
        //Create an iterator based on the source view object
        RowSetIterator iter=getViewObject1().createRowSetIterator(null);
        iter.reset();
        //iterate through the first view object
        while(iter.hasNext()){
            Row current=iter.next();
            if("2".equals((current.getAttribute("Period")){
                //create a new empty row from the second view object
                Row newRow=getViewObject2().createRow();
                //copy all attributes from one view object to the other
                newRow.setAttribute("attr1", current.getAttribute("attr1"));
                newRow.setAttribute("attr2", current.getAttribute("attr2"));
                newRow.setAttribute("attr3", current.getAttribute("attr3"));
                //insert the new row to the second view object
                getViewObject2().insertRow(newRow);
        //RowSetIterators should always be closed
        iter.closeRowSetIterator();
        }I hope I understood your use-case correctly.
    Gabriel.

  • How to fetch all the records

    Hello everybody,
    I am currently working on SQL Developer for the couple of weeks. I have specific need to check, how much time one query take to fetch all the records. Currently it can fetch only 50 records and when scroll then next 50 records and so on.
    Can anybody tell me, how to set this to fetch full records
    Regards,
    Martand M Joshi

    Martand,
    There's no setting to fetch all records. You wouldn't like SQL Developer to fetch for minutes on big tables anyway.
    If, for 1 specific table, you want to fetch all records, you can do Control-End in the results pane to go to the last record. You could time the fetching time yourself, but that will vary on the network speed and congestion, the program (SQL*Plus will be quicker than SQL Dev because it's more simple), etc.
    Now, what I think you really want here, is getting the execution time. If you really want to analyze the query's performance, you'd have to use the explain plan, autotrace and tkprof (see the manual for tuning and performance).
    To make us life easier, the makers of SQL Developer included support of the explain plan, and as of v1.1, autotrace!
    I'm sure you've got enough to work things out from here...
    Regards,
    K.

  • How to update all the record for a particular column in a table based on search criteria.

    Hi All,
    I am new to ADF. I have a requirement, where i have to perform mass update on a table.
    Scenario:
    Ex: I have a dept manual search region. where i search with deptId: 20. I get 20 records in my table. now i have  another region where i have a inputchoice list which contains all the columns names that exists in dept table. Beside that i have a input text box and an update button
    Now user, first searches with dept id:20 and clicks on search button, where it shows 20 record in the table. He then select a column from input choicelist(ex: ManagerId), then enters new value in the input box(ex: abc) then clicks on update button.
    Now i want, all the records in the ManagerId column with dept id:20 to be updated with the new value "abc"
    Can anyone help me with the code.
    Thanks in advance..

    Hi,
    If you go to your VO and generate the ViewObjectImpl, in there you can create a method which will contain two parameters, 1 the attribute name and 2 the value.
    Then you can follow something like explained in this post:
    ADF Tutorial: How to apply bulk actions to a view object rows
    The only difference is that you will need to create a method like this:
    public void updateAttribute(String attribute, Integer value){
            RowSetIterator iter = createRowSetIterator(null);
            while (iter.hasNext()){
                Row row = iter.next();
                row.setAttribute(attribute, value);
    Then you expose that as a client interface and then after you filter your table by your criteria you just need to execute this method passing the right parameters.
    Regards

  • How to get all the Record Groups?

    in the form i had created a record group. let us say they are:
      RG_APPR_TYPE_CDE_LIST
      RG_DRV_APPR_TYPE_CDE_LIST
      RG_PROJ_MODE_CDE_LIST
      RG_DRV_PROJ_MODE_CDE_LIST
      RG_PROJ_STATUS_CDE_LIST
      RG_DRV_PROJ_STATUS_CDE_LIST
      RG_ORG_SUB_TYPE_CDE_LIST
      RG_DRV_ORG_SUB_TYPE_CDE_LIST
      RG_REGION_NUM_LIST
      RG_DRV_REGION_NUM_LISTwhen the form hits on the clear button it invoke the CLEAR_FORM. i want to get all the record groups dynmically so i won't have to explicitly call the
      Delete_Group('RG_APPR_TYPE_CDE_LIST');
      Delete_Group('RG_DRV_APPR_TYPE_CDE_LIST');
      Delete_Group('RG_PROJ_MODE_CDE_LIST');
      ...one by one. is there any other workaround? i appreciate any help on this. thanks.

    is there any other workaroundNo.

  • How to get all the records in the RSA3 extratcion

    Hi All
    i have problem in seeing the records at RSA3. when i load the data im getting around 14k records when i want to see all the records ,i am not able to see that.. but the records are available in tables...
    i want to see the the some asset numbers but for RSA3 its getting me upto 1k records..
    I want to check my datasource is that working properly or not.
    please help me
    regards
    AK

    Thanks alot Bhanu ,,,,
    Actually i was not concentrating on the first screen ...always going to next screen and searching for defferent searching ...
    got the records now thanku very much
    Rewarded points
    Regards
    AK

  • How to display all the Records of all the "Books of Business" in Report ?

    Hello,
    I have a user with 3 "Books of Business" (No Sub Books).
    I would like to generate a report with the data of the 3 books.
    With the "selector", it seems that I can't choose the "All" option.
    Can someone confirm the behavior ?
    Thanks for your help.

    Hello,
    I do have a similar problem.
    I have already tried to create a parent book (the checkbox "can contain data" is not activated), assign it to sub-books and add first my user as a book user (Admin role). However, when I start a simple report which should show e.g. Number of Contacts in a book an choose the parent book in the book selector I get an error message and there are no results ("The specified criteria didn't result in any data").
    Did I miss any setup steps or is not possible to see all the records at once which belong to the sub-books with a parent book?
    If I pick my user book, I see only the records I own. The problem is that our CEO needs a view there he could see records in sub-books separately but also the records in both of them at once. Unfortunately, the Manager Visibility can not be applied because we have a different hierarchy in the system as it is in real (otherwise wrong data in forecasts).
    Many thanks in advance
    Regards, Vilma

  • How can get all the components used on the current page

    how can I get list of all components being used on the current page using javascript. I have tried CQ.WCM.getComponentList(CQ.WCM.getPagePath()) but this seems to list all the components available.
    Environment CQ 5.5 Update 1, Widnows 7

    You have to remember that once you are in JS, you are only really able to retrieve markup or representations of the DOM.  The markup is the result of a combination of components, which is technically a "server only" concept.  Components are just a way for CQ to organize executable code, so once a page is rendered a component isn't really a thing.  The closest thing I can think of is to list all of the DIVs that represent a component wrapper that are on the page, but this is error prone and clunky.  You could also make AJAX calls back to the server to retrieve a list of the components by node name, but that approach would not return synthetic resources (ones that render, but do not have a node representing them).
    Why are you trying to do this?  Maybe someone has a better idea, but this has a bad smell to me.

  • How to find all the table used in a report

    Hi Expert ,
                    Is there is any program  to find out all the tables which  are used in a perticular report .
    Thanks in advance
    Tarak

    Well, so far Viquar Iqbal has given the only really correct answer - use SQL trace.  The reason the others are incomplete, is because they don't consider that a report might call a function module or a class method that accesses a table.  In fact, for many applications this is exactly what happens - db accesses are abstracted away from the main program.
    The other alternative to SQL trace is to use Run Time Analysis.  The advantage of SQL trace is that it shows the tables hit in order.
    matt

  • How to find all the parts used from stock for 1 machine

    Dear Sap community,
    I'm trying to find all the spare components that are used for 1 specific machine.
    If I look in the work orders under components it only gives the components that are orderd.
    But I would like to find the components that come out of stock. I asked the stockkeeper and he said he writes it all in the work orders but we can't find it back.
    It would be nice to just find it on the work order but it would be easier if I could just choose a machine and then find all the spare parts used from stock.
    So my question is can I find all the spare parts used for 1 machine or just find the spare parts in the work order?
    Thank you for any help you can provide in this situation,
    Michael Claes

    Hi,
    In addition to puneet's information:
    Training and Event Mgmt  infotypes:
        Prices (Infotype 1021)
        Availability Indicators (Infotype 1023)
        Capacity (Infotype 1024)
        Depreciation Meter/Validity (Infotype 1025)
        Business Event Info (Infotype 1026)
        Site-Dependent Additional Info (Infotype 1027)
        Address (Infotype 1028)
        Business Event Type Info (Infotype 1029)
        Procedure (Infotype 1030)
        Mail Address (Infotype 1032)
        Name Format (Infotype 1034)
        Schedule (Infotype 1035)
        Costs (Infotype 1036)
        Billing/Allocation Info (Infotype 1037)
        Business Event Blocks (Infotype 1041)
        Schedule Model (Infotype 1042)
        Demand (Infotype 1060)
        Web Link (Infotype 1061)
        Knowledge Link (Infotype 1062)
        Business Event Group Info (Infotype 1063)
    Thanks,
    Anil.G

  • How to find all the infotypes used for LSO?

    Folks,
    Can anyone help me on how to find the related infotypes used for LSO?
    Thank
    S

    Hi,
    In addition to puneet's information:
    Training and Event Mgmt  infotypes:
        Prices (Infotype 1021)
        Availability Indicators (Infotype 1023)
        Capacity (Infotype 1024)
        Depreciation Meter/Validity (Infotype 1025)
        Business Event Info (Infotype 1026)
        Site-Dependent Additional Info (Infotype 1027)
        Address (Infotype 1028)
        Business Event Type Info (Infotype 1029)
        Procedure (Infotype 1030)
        Mail Address (Infotype 1032)
        Name Format (Infotype 1034)
        Schedule (Infotype 1035)
        Costs (Infotype 1036)
        Billing/Allocation Info (Infotype 1037)
        Business Event Blocks (Infotype 1041)
        Schedule Model (Infotype 1042)
        Demand (Infotype 1060)
        Web Link (Infotype 1061)
        Knowledge Link (Infotype 1062)
        Business Event Group Info (Infotype 1063)
    Thanks,
    Anil.G

  • How to capture all the values(occurrence) using Extraction Rules(correlation) in VSTS web test?

    Hi,
      I am using VSTS 2010 for performance testing and have a question about Extraction Rules functionality.  Requirement below.
    Example :
    Server Response
    <a>1</a>
    <a>2</a>
     <a>3</a>
    <a>...</a>
    we need to capture all the values with same left and right boundary. Along with the number of occurrence from the response. We need pass a random value in the
    index where the index value will be between 0 - count of values with same left and right boundary.
    How to find out the count of values with same left and right boundary.

    Thanks for Adrian's help.
    Hi PChav,
    Based on your issue, I think that the Adrian's suggestion is useful for you, so I suggest you could refer the Adrian's suggestion to check your issue.
    In addition, I suggest you could also try the rogeorge's suggestion to create a custom extraction rule to do this.
    Reference:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/ccff9f7a-d5bc-45d5-80eb-c83f9fc0e103/how-to-capture-all-the-valuesoccurrence-using-extraction-rulescorrelation-in-web-test?forum=vstswebtest
    Hope it help you!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • CS6 Encore - images not showing up in backgrounds

    I want to import my images to use as menu backgrounds. When I import the images they show up in the "diplay images" but not "display of backgrounds". In fact, I have no backgrounds showing up. Thanks for any help.

  • Help menubar flash to director

    when import a menu developed with the component menubar flash and give transparency to the menubar, which happens to it is necessary to give it a click off, I need you to help me that it is disabled once the mouse is not on it.

  • TCA value set error

    I have created three value sets and this one is to extract the contact from the id the value set gets sent. SELECT PARTY.PARTY_NAME, DECODE(ACCT_ROLE.STATUS,'A','Active','I','Inactive')||' '||PARTY.PERSON_LAST_NAME||' '||PARTY.PERSON_FIRST_NAME, ACCT

  • IPhoto crashed while importing photos

    While importing photos, iPhoto crashed. Now the pictures are damaged. Is there a possibility to regain them or salvage them?

  • P67A-GD55 (B3): Where should the 4-pin speaker connector plug to?

    I can't find it anywhere!  I've thoroughly read through the manual and I still can't figure it out where