How to call two variable which are hold multiple value  in to for loop

hi,
i have 4 item ,Two Select List And Two Check Box .Class id And Section are select list and student id and subject id are check box .i want to insert More then one subject id in to table corresponding to more then one student id .
eg. when i select class id 1 and section A then student id of class 1 and section A comes into Student id(check box item ) and all subject corresponding to class 1 comes into subject id( check box item).
now i want to insert multiple selected subjects with respect to selected multiple student id in to table when i press submit Button.
My table is
CREATE TABLE "STUDENT_SUBJECT_DETAIL"
(     "S_NO" NUMBER,
     "STUDENT_ID" NUMBER,
     "SUBJECT_ID" VARCHAR2(50),
     "SESION" VARCHAR2(50)
i am using this Code
DECLARE
STU wwv_flow_global.vc_arr2;
SUB wwv_flow_global.vc_arr2;
begin
STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
for i in 1..STU.count loop
for i in 1..SUB.count loop
insert into STUDENT_SUBJECT_DETAIL
values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
end loop;
end loop;
END;
Edited by: Manoj Kaushik on Nov 20, 2009 10:10 PM

DECLARE
    STU wwv_flow_global.vc_arr2;
    SUB wwv_flow_global.vc_arr2;
BEGIN
    STU:= wwv_flow_utilities.string_to_table(:P57_STUDENT_ID);
    SUB := wwv_flow_utilities.string_to_table(:P57_SUBJECT_ID);
    FOR i in 1..STU.count LOOP
        FOR i in 1..SUB.count LOOP
            insert into STUDENT_SUBJECT_DETAIL
            values(CLA_SUB_ID_SEQ.nextval,STU(i),SUB(i),:p57_SESION);
        end loop;
    end loop;
END;This doesn't look right to me:
1. You have 2 loops, and they are both using the variable i as a counter.
2. Your insert needs to be in the form: insert into table (column names) values (values to insert)
3. Why not use a trigger to get the nextval from the sequence?
Trent
Edited by: tr3nton on Nov 21, 2009 4:16 PM

Similar Messages

  • How can I import songs which are filed basis one album/compilation as one folder?

    How can I import songs which are filed basis one album/compilation as one folder?
    i can drag and drop one folder which is a proper album into itunes under playlist. if i drag and drop two proper albums into itunes it is also ok but if itunes does not know my own compliations and i drag and rop my 3000 folders in one shot into itunes i get only one playlist containing all songs.
    pleased to hear if anybody know how i can avoid to do 3000 times drag and drop a folder into itunes.
    rgds, alexander

    Before you begin the import, edit the properties of the tracks to set the Album Artist to Various Artists and Part of a Compilation to Yes.
    For more info. see Grouping tracks into albums.
    tt2

  • How to call two RFC in a single JAVA method.

    Dear all,
    I just want to know that how to call two RFC in a single java method which is defined in CRM implementation file. I'm using NWDS as the customization IDE & working on ISA 7.0.

    Hi Sunil,
    In the Backend Implementation class, in any method you can call multiple RFCs.
    It will be the same way as you do for the single RFC call.
    Following syntax is for your reference.
    Get the JCO connection
    JCoConnection  connection = getDefaultJCoConnection();
    JCO.Function func = connection.getJCoFunction("ZXXXXXXX");
    set the import parameters
    Execute it.
    connection.execute(func);
    get the data from export / table parameters
    Now call the second RFC
    func = connection.getJCoFunction("ZYYYYYYYYYY");
    set the import parameters
    Execute it.
    get the data from export / table parameters
    close the connection
    Hope this will help you.
    -Chandra.
    Edited by: Chandra Sekhar Seeli on Jan 13, 2011 2:04 PM

  • Create relation between two blocks which are based on different procedure

    Hiii
    How to create relation between two blocks which are based on different stored procedures in Oracle form??
    Pradhyumn Sharma

    hiii,
    I selected the common key deptno in both procedure.
    I created a relation between both procedure. but when i compile the form it give an error in ON-CHECK-DELETE-MASTER. My procedure are
    ==================================
    PACKAGE emp_pkg AS
    TYPE emprec IS RECORD(
    empno asg_emp.empno%type,
    ename asg_emp.ename%type,
    job asg_emp.job%type,
    sal asg_emp.sal%type,
    deptno asg_emp.deptno%type);
    TYPE emptab IS TABLE OF emprec INDEX BY BINARY_INTEGER;
    PROCEDURE empquery(block_data IN OUT emptab, p_deptno IN NUMBER);
    end;
    ====================================
    PACKAGE dept_rec IS
    type rec is record(dname asg_dept.dname%type,
         loc     asg_dept.loc%type,
         deptno asg_dept.deptno%type);
    type deptrec is table of rec index by binary_integer;
    PROCEDURE dept_rec1(block1 in out deptrec);
    END;
    ===================================
    In ON-CHECK-DELETE-MASTER
    CURSOR BLOCK9_cur IS
    SELECT 1 FROM dept_rec.dept_rec1 d
    WHERE d.DEPTNO = :BLOCK6.DEPTNO;
    identifier dept_rec.dept_rec1 must be declared.
    Regards
    Pradhyumn

  • How to select two variables from recordset

    Parse error: parse error in
    C:\wamp\www\dotweb\access\agreement_handbook.php on line 72
    I get the above error when I try to run the above page. I
    don't know how to select one variable which is the compid that I
    get from the url and a specific name from another column called
    documentname. I know that this is a very simple thing and I could
    do it just fine with ASP pages, but this is my first time with PHP.
    Please help!!!

    On Tue, 17 Feb 2009 20:56:30 +0000 (UTC), "kmlohr"
    <[email protected]> wrote:
    > $query_rsAgreements = sprintf("SELECT * FROM agreements
    WHERE CompId = %s and
    >DocumentName = "handbook"",
    GetSQLValueString($colname_rsAgreements, "int"));
    Change the above line to:
    $query_rsAgreements = sprintf("SELECT * FROM agreements WHERE
    CompId = %s
    and DocumentName = 'handbook'",
    GetSQLValueString($colname_rsAgreements,
    "int"));
    Gary

  • How to call two different servlet-url in the same application

    Hi,
    I want to call, consecutively these methods in my application.
    response.sendRedirect(servlet-url1)
    reponse.sendRedirect(servlet-url2)
    but the second method dont answer,
    I think, the first method redirect s with response ,
    but how to call two different servlet ?
    thanks

    if you call the first redirect, the servlet is getting aborted, so you can redirect to the first servlet, working the stuff in it, and then in the second servlet you can redirect to the third servlet

  • How can i send videoes which are not in camera roll via whatss app to others ?

    hi,
    I am going to know that how can i transfer video which are not in camera roll via whatss app to others ?
    thnaks in advanced.

    Where are the videos?
    If WhatsApp supports sending videos from the Camera Roll only and that is your only option, that is it.
    Contact WhatsApp. They have a website.

  • How can I unmark photos which are marked for republish to Flickr?

    I am currently using Lightroom 3 to publish photos to Flickr. I have a free Flickr account.
    My problem is that I have a set of photos I am publishing to flickr. For some reason some of my photos lost their keywords, only the files on my computer lost them, the photos on Flickr still have the keywords intact. Also I applied a colour code to a couple of the photos on my hard disk that are being published to Flickr.
    Now Lightroom has detected these changes and the photos appear under 'Modified Photos to repblish' the thing is the changes I made were either putting keywords back in that were already in Flickr anyway, and colour coding which makes no different to flickr. Because I have a free account if I republish the photos I will lose all the comments and stats on Flickr, so I don't want to republish them.
    Whenever I click the publish button I get a warning that republishing the changed photos will lose any information on flickr and I have the option to skip them, and just publish new photos. But if I ever do want to republish a photo I won't be able to do this without also republishing all the photos marked for republish.
    Is there any way I can remove these photos from the republish list?

    All,
    This is an issue with the LR programming, as it does NOT allow you to unmark images it feels need to be republished. Oftentimes it's only a matter of adding a keyword or tweaking the develop settings that triggers this. I for one wish that choice was available.
    Here's what you can do: simply disconnect from the Flickr service. Doing so will have NO detrimental effect on the images in Lightroom or the images you have already uploaded to Flickr. What you will lose, however, is the "library" of images that you have already uploaded to Flickr. Since this is really only a collection there's no harm. Besides, if you need to review which of your images have been uploaded to Flickr at a later time, just reference Flickr. Oh, you'll also lose Lightroom's ability to download any comments your Flickr contacts make on your uploaded images. If it's important for you have that data in Lightroom, rethink the disconnect option. After disconnecting, reconnect using the same parameters you had before. Your Lightroom/Flicker collection will be cleared of all previously uploaded images and you can begin adding new images to upload.
    Again, disconnecting has no effect on your Flickr content. However, if you REMOVE images from the collection using Lightroom, they will also be removed from Flickr. Please understand the distinction between disconnecting from the Service and removal of images using Lightroom.
    All that being said, republishing images from Lightroom to Flickr, in my experience, should not cost you anything in terms of number of views, favorites, comments, etc. It should be seamless.
    Judson Rhodes, Photographer
    www.flickr.com/jrcp/show
    www.judsonr.com
    Date: Tue, 29 Mar 2011 09:43:18 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I unmark photos which are marked for republish to Flickr?
    Hi,
    I'm using LR 3.2 and am having the same issue. I see that no one from Adobe has replied to this and that the previous reply was from August, 2010. There seem to be no answers to this one...
    I have several images that LR feels should be republished, and ONE image that I want to republish. I CAN'T republish just that one image though without republishing ALL the other images.
    Can someone (maybe someone from Adobe) help me with this? How can I simply UNmark the other images to not be republished? I do not want to remove them from the collection, but simply do not want to republish them at this time.
    Why can't Adobe simply ask us if an image should be republished or not? Why can't they allow us to UNmark an image to be republished once it's marked?
    Ideas??  HELP!
    Thanks!
    Steve
    >

  • HT204053 i just brought new i phone 5 yesterday and now i can see all paid applications and i dont use or have credit card also now how i can buy applications which are important for me? can i buy them online? or use debit card

    i just brought new i phone 5 yesterday and now i can see all paid applications and i dont use or have credit card also now how i can buy applications which are important for me? can i buy them online? or use debit card and trust me all my friends are regretting buying phone because of this problem.Kindly help.Cant it can be deducted from our mobile charges?i would be much easier then

    You can buy apps using iTunes Gift cards without needing to register your debit card.
    http://store.apple.com/us/personalize/itunes

  • How to identify the SQLs which are using the tables and new columns

    Hi
    I m using oracle 10G Database in windows. Developers have added some columns in some of the database tables and were asking to check whether there is some impact on performance or not. I have not done this performance tuning before. Kindly help me how to proceed further.
    How to obtain the sqls which are touching the tables and the new columns? It would be really great if you can help me with this.
    Thanks

    You can try to use DBA_DEPENDENCIES to get PL/SQL objects using tables: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1041.htm#i1576452.
    However if SQL code is not stored in database in a trigger, a procedure, a function, a package or a view, it is impossible to retrieve all SQL code referencing some table from database dictionary: for this you would have to analyze application source code.

  • How to use xml forms which are built by using xml forms builder?

    Hi Experts,
    please explain How to use xml forms which are built by using xml forms builder in Web page composer?
    Thanks,
    Anil.

    hi buddy u can try the following page:
    http://help.sap.com/saphelp_nw70/helpdata/en/8f/fe743c74fa6449e10000000a11402f/frameset.htm

  • How to unreleased Appraisal templates which are alreay being in used

    Hi Experts,
    I am looking for the solution how to unreleased appraisal templates which are already released and also used by the Employees for their PDD process.
    We are facing one problem in PDD templates, so we want to make some changes in already released templates.
    Is there any way or solution by any Functional method/settings or by ABAP program?
    Please reply as it is very critical and important for us to solve ASAP.
    Thanks & Regards,
    Ashish Mehta.

    Now that might work (actually it will work). But you need to be 100% sure that your changes will not infleunce the appraisal process. Because it is not that hard to cause unrepairable data inconsistencies on already existing appraisal documents!!
    There is a very good reason for not being able to unrelease templates once they are in use!
    One is that you can create incorrect appraisal documents from a business point of view.
    Say your document end appraisal is a 1-10 scale, one being the worst. The appraisal gets a 3 as final score, meaning in this scale quite bad. Now you unrelease the template and change the used scale to a 1-4 scale. Your very bad employee turns all of a sudden in a quite good employee!
    Even worse, <b>you can create database inconsistencies on document level</b>. Just remove elements or columns from the template and you will get very strange results after releasing again.
    I don't recommend changing templates once documents are based on them but if you use this option then be carefull!
    Regards and Groetjes,
    Maurice

  • How to remove the tasks which are not manually recoverable?

    How to remove the tasks which are not manually recoverable?
    I tried performing manual recovery for the BPEL processes but there are few tasks which cant be manually recoverable..
    Could you please tell me how to remove those tasks and also tell me which information in the console is the task_id in the database?

    This article explains how to cleanup bpel process instances, you can find task instance id by searching for data in payload using api.
    Managing a BPEL Production Environment
    http://www.oracle.com/technology/pub/articles/bpel_cookbook/blanvalet.html
    Cheers,
    Rad

  • How to call procedure in which one formal parameter is associative array ty

    how to call procedure in which one formal parameter is associative array type,
    pls explain with eg.

    >
    above code work fine but when i use case then it give error like
    i identifier should be declare
    & my code is as
    CASE v_array(i)
    WHEN 'A' THEN
    insert into di_ivpn_report (ID, test_name, table_name, status, entity, proposition)
    values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
    v_status, v_ent_name, v_array(i));
    WHEN 'B' THEN
    insert into di_mpls_report (ID, test_name, table_name, status, entity, proposition)
    values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
    v_status, v_ent_name, v_array(i));
    END CASE;
    >
    Then you have to use ordinary loop
    PROCEDURE insert_update_***_array (TRANID IN VARCHAR2, ATT_NAME IN VARCHAR2, ENT_NAME VARCHAR2, v_array IN ***_array)
      IS
        v_tranid VARCHAR2(1);
        v_att_name VARCHAR2(100) := ATT_NAME;
        v_ent_name VARCHAR2(100) := ENT_NAME;
        v_att_id VARCHAR2(6);
        v_ent_id NUMBER;
        v_status VARCHAR2(20) DEFAULT 'INACTIVE';
        I        NUMBER;
       BEGIN
        i := v_array.first;
        while i is not null loop
          CASE v_array(i)
          WHEN 'A' THEN
            insert into di_ivpn_report (ID, test_name, table_name, status, entity, proposition)
            values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
            v_status, v_ent_name, v_array(i));
          WHEN 'B' THEN
            insert into di_mpls_report (ID, test_name, table_name, status, entity, proposition)
            values (v_att_id, v_att_name, 'DI_'||v_array(i)||'_REPORT'||'_'||v_att_id,
            v_status, v_ent_name, v_array(i));
          END CASE;     
          i := v_array.next(i);
        end loop; 
    end;

  • How to extract vendors numbers which are included in a particular payment program variant or from a payment identification?

              How to extract vendors numbers which are included in a particular payment program variant or from a payment identification?

    Hi ,
    That's not a Problem as well.
    Go to F110 nd then see as below screen shot . This will give you everything that has included in payment .
    you have an option of diplay which will give same list but vendor included for paid . You have option  to get paymnet summary and all other . Please check them out and let me know if you need more help

Maybe you are looking for

  • What kind of charger do I need for a 17-inch Macbook Pro?

    I have a 4 year old Macbook Pro and the charger just failed on me. I'm looking on the wensite and I see Magsafe 1 and 2 and converters. What do I need for my laptop?

  • VI Reference Property Node inside sub-vi

    Hey Folks, I was always curious about why this is: If I open a vi-reference in one vi, and pass the reference to a sub-vi, I can put a property node in the sub-vi and get all properties just fine - as long as I am in debug mode.  When I compile to an

  • There is no decline option for phone calls!

    Hello everyone. Actually i received a phone call today and i wish i could decline it but it only displays on my iPhone 5 the answer option by swiping to the right direction on the green toggle. where can i find the decline thing or it's just not ther

  • UCCX 8.0 and 8.5 RAM or memory requirements

    All, I reviewed the document: Cisco Unified Contact Center Express (Cisco Unified CCX) Software and Hardware Compatibility Guide Cisco Unified Contact Center Express and Cisco Unified IP IVR Last Updated: June 22, 2011 I see where it list the hardwar

  • WET200 to WET200 Bridge, WEP Only?

    Hi, first time poster I've just purchased 2 WET200 wireless bridges for our organisation, with the intention of using them to create a wireless bridge between 2 buildings.I've followed this guide here: http://www.cisco.com/en/US/products/ps10047/prod