How to enter multiple records

Hi all

I use oracle 10g and 10g db forms.

I developed a form and the user will enter data into the form and click that box and press save data button get inserted into the table.

If the user enters data two times and then click on the checkbox and enter the backup of the data that one button get inserted.

Inside this XXBANK_GUARANTEE_HEADERS procedure. XXBANK_GUARANTEE_INSERT I wrote my insert statement.

I have my code is like this

BEGIN
Premier_enregistrement;
LOOP
IF (: System.Last_Record = 'TRUE') THEN
EXIT;
ELSIF: BANK_GUARANTEE_BLK. CHECK_IN_OUT = 'Y '.
THEN
XXBANK_GUARANTEE_HEADERS. XXBANK_GUARANTEE_INSERT;
Next_Record;
END IF;
END LOOP;
END;


Can someone pls correct me where I went worng.

concerning
srikkanth

Hi try

BEGIN
First_Record;
LOOP
IF :BANK_GUARANTEE_BLK.CHECK_IN_OUT = 'Y'
THEN
XXBANK_GUARANTEE_HEADERS.XXBANK_GUARANTEE_INSERT;
END IF;
Exit when :System.Last_Record = 'TRUE'
Next_Record;
END LOOP;
END;

It is because once it reaches the last record, you have coded out, even before processing the file.
Now, I put this condition of release at the last

Tags: Oracle Development

Similar Questions

  • How to view multiple records to a report form - as the model?

    Hi all
    I developed a form - like model report
    I want to show him several records at once (on the same page)
    I tried assigning a value of "Maximum records per page" property for the extensible framework 10
    but when I close the range property and open it again the value returns to 1!
    How to display multiple records on the same page?

    Thank you

    Hello

    check around your formatting images if all have the "vertical stretch" value to the variable or develop.

  • How to concatenate multiple records in a single

    Hello world:

    I want to know if is a way to concat multiple records into one without the help of the sliders. For example, I have a table named "Authors" like this:

    LAN | Author
    -----------------
    English | Ernest Hemingway
    Spanish | Octavio Paz
    Spanish | Mario Vargas Llosa
    English | Sinclair Lewis
    Spanish | Gabriel García Márquez


    And I want to get this:

    Author
    -----------------
    Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez

    I have worked with SQL Server and I can do something like this:

    CREATE FUNCTION dbo. MyConcat (@lan varchar (10))
    RETURNS varchar (5000) AS
    BEGIN
    declare @retvalue varchar (5000)
    Set @retvalue = "
    Select @retvalue = @retvalue + author + ',' authors where lan = @lan
    return substring (@retvalue, 1, len (@retvalue)-1)
    END

    That is to say, do not use cursors to concatenate records. However, with ORACLE, I do something like that.

    FUNCTION MyConcat(P_Lan IN VARCHAR2) VARCHAR2 IS BACK
    v_ret VARCHAR2 (4000);
    v_element VARCHAR2 (4000);
    v_cursor sys_refcursor;
    BEGIN
    OPEN to SELECT V_cursor author of authors where Lan = P_Lan
    LOOP
    SEEK v_cursor INTO v_elemento;
    OUTPUT WHEN v_cursor % NOTFOUND;
    IF v_ret IS NULL THEN
    v_ret: = v_element;
    ON THE OTHER
    v_ret: = v_ret | ', ' || v_element;
    END IF;
    END LOOP;
    RETURN v_ret;
    END;

    There is another way to to do?

    Best regards
    Jack

    You can find plenty of examples here:

    http://www.Oracle-base.com/articles/Misc/StringAggregationTechniques.php

    and also here:

    http://www.sqlsnippets.com/en/topic-11787.html

    Published by: hoek on October 21, 2010 17:50

  • How to display multiple records in a loop

    Hello

    This procedure returns some data.

    so please tell me how I can write a loop to display all the records from a Table.

    This is my procedure:

    create or replace procedure getEmpName
    *(*
    Employee in V_EMPID. EMPID % TYPE,
    V_EMPNAME employees. EMPNAME % TYPE
    *)*
    is
    Start
    Select empname into V_EMPNAME from employees where empid = '2';
    end;


    It's my block: how to write a loop here to display all of the records in my Table

    declare
    v_EMPNAME EMPLOYEE. EMPNAME % TYPE;
    Start
    getEmpName (2, v_EMPNAME);
    dbms_output.put_line (v_EMPNAME);
    end

    user10503747 wrote:
    so please tell me how I can write a loop to display all the records from a Table.

    Hello
    given the procedure displays all records in the table emp...

    CREATE OR REPLACE PROCEDURE Testloop
    AS
    CURSOR test1
    IS
    SELECT EMPNO, ENAME FROM EMP;
    BEGIN
    I'm IN test1
    LOOP
    DBMS_OUTPUT. Put_line (' Emp - ' | i.empno |) » -'|| i.ename);
    END LOOP;
    END;
    /

    Thnx
    MB

  • How to update multiple records

    Hello

    I have this problem

    I have this table whith 100,000 records with the State of the column = DONE

    NUM_CUSTSTATUSDATE
    00931754FACT05/05/2015-00:00:00
    00931741FACT05/05/2015-00:00:00
    00931742FACT05/05/2015-00:00:00
    00931744FACT05/05/2015-00:00:00
    00931743FACT05/05/2015-00:00:00
    00931747FACT05/05/2015-00:00:00
    00931746FACT05/05/2015-00:00:00

    I need to update the State of the column with values from another table

    AU_NUM_CUSTAU_DATEAU_STATUS
    0093175405/05/2015-00:00:00FACT
    0093174105/05/2015-00:00:00DELETE
    0093174205/05/2015-00:00:00DELETE
    0093174405/05/2015-00:00:00DELETE
    0093174305/05/2015-00:00:00DELETE
    0093174705/05/2015-00:00:00DELETE
    0093174605/05/2015-00:00:00DELETE

    Thanks if you can help

    Hello

    You can use the merge sql stmt:

    merge into target_table t

    using s source_table

    on (t.num_cust = s.au_num_cust and = t.date s.au_date)

    When matched then

    update set s.au_status = t.status

    Greetings,

    SIM

  • [ADF, JDev 12.1.3] How to display multiple records on the same page... not in a table but they appear a form for each record

    Hallo,

    I need to create a page that displays the records of a VO, but I would not use a table.

    Instead, I would like to display a form for each record to be displayed.

    Forms must appear one above the other and each form should have 2 buttons: one to remove the file/form itself and one to add a new file/form.

    When you press the button Add a new empty form should be dynamically added to the page (so that the user can fill) and created related record.

    When REMOVE button is pressed the form (which contains the operated button) should be disappear and the record shuould be deleted.

    Creations and destruction must be applied only if the user clicks a button on CONFIRMATION / COMMIT.

    Maybe this http://digilander.libero.it/flattit82/OTN_FILES/MultiFormPage.png picture can help to understand what I want to do.

    You kindly help me?

    Thank you

    Federico

    Hi Federico

    I was saying that your page layout can be achieved using af: table

    See this image:

    This provision is af:table (I think same as yours), just add a column in the table and put all the fields in this column then correct layout allows to design as a provision on the form or group layouts

    I'm not saying it's the best approach, but you can try this

    Thank you

  • How to retrieve multiple records in XML using PL/SQL with XE 10 g

    Hi all

    I need your advice, if you please.
    I have an object CLOB as a result of a Web Service, I need to analyze. I use the XE version, XQuery is not for me, I get SYS. Exception DBMS_XQUERYINT.

    I tried to use the snippet, but it looks like I'm doing something wrong there. Please tell me what should I change?

    (1) I have a temporary table with id and xmltype
    (2) I have tested that the example data in the table
    (3) I get nothing no matter if I use,'/ modifyPlannedItemStatus/days [1] / day_of_week_order "or simply,'/ modifyPlannedItemStatus/days [1] / day_of_week_order'."

    Thanks in advance


    DECLARE
    my_xml XMLTYPE.
    my_clob CLOB: =' <? XML version = "1.0" encoding = "UTF-8" standalone = 'no '? >
    < mgns1:modifyPlannedItemStatus xmlns:mgns1 = "http://www.mart-sw.co.uk/library" >
    < days >
    A < day_of_week_code > < / day_of_week_code >
    < day_of_week_order > 1 < / day_of_week_order >
    Monday < day_of_week_name > < / day_of_week_name >
    < / days >
    < days >
    < day_of_week_code > B < / day_of_week_code >
    < day_of_week_order > 2 < / day_of_week_order >
    Tuesday < day_of_week_name > < / day_of_week_name >
    < / days >
    < / mgns1:modifyPlannedItemStatus > ';

    I INTEGER: = 1;

    my_varchar VARCHAR2 (3000);
    BEGIN

    insert into session_temp_xml values (i, xmltype.createxml (my_clob));

    SELECT to_clob(extract(s.xml_data,'/modifyPlannedItemStatus/days[1]/day_of_week_order')) IN the s session_temp_xml my_varchar;


    dbms_output.put_line (' result ' |) RTrim (my_varchar));


    END;

    Hello

    'Re missing you the declaration of the namespace of the root node.

    extract( s.xml_data
           , '/mgns1:modifyPlannedItemStatus/days[1]/day_of_week_order'
           , 'xmlns:mgns1="http://www.mart-sw.co.uk/library"' )
    

    This will give you an instance of XMLType:

    1
    

    To convert it to CLOB or VARCHAR2 (i.e. to serialize the XML content in a character stream) use one of the getter methods getClobVal or getStringVal.
    If you want to retrieve the scalar value of the element (text node), use extractValue in place of the extract function.

    Here is an example on how to extract some repetitive elements in your version:

    SQL> create table session_temp_xml (
      2   id number,
      3   xml_data xmltype
      4  );
    
    Table created
    
    SQL> insert into session_temp_xml values (1, xmltype(
      2  '
      3  
      4  
      5   A
      6   1
      7   Monday
      8  
      9  
     10   B
     11   2
     12   Tuesday
     13  
     14  ')
     15  );
    
    1 row inserted
    
    SQL>
    SQL> SELECT extractValue(x.column_value, '/days/day_of_week_code') as day_of_week_code
      2       , extractValue(x.column_value, '/days/day_of_week_order') as day_of_week_order
      3       , extractValue(x.column_value, '/days/day_of_week_name') as day_of_week_name
      4  FROM session_temp_xml s
      5     , TABLE(
      6         XMLSequence(
      7           extract(
      8             s.xml_data
      9           , '/mgns1:modifyPlannedItemStatus/days'
     10           , 'xmlns:mgns1="http://www.mart-sw.co.uk/library"'
     11           )
     12         )
     13       ) x
     14  ;
    
    DAY_OF_WEEK_CODE      DAY_OF_WEEK_ORDER      DAY_OF_WEEK_NAME
    --------------------- ---------------------- ---------------------
    A                                          1 Monday
    B                                          2 Tuesday
     
    

    Hope that helps.

  • Data merge: how to get multiple records in a single text?

    Hello

    I'm experimenting with data merging in InDesign CS3. The biggest obstacle I've met tries to get my record flowing continuous text in a single text frame (which would, ideally, "automatic formatting" on the new pages in the document). Records vary considerably in length, and so I can't just create a standard repeat on the page text frame.

    Perhaps, data fusion is not the best way to achieve this and I should be learning to script in place. I feel like I'm just one step, however.

    Any suggestion would be appreciated.

    Data fusion is not thread. There is a nifty script to Rorohiko who will do it for you after the merger, however. Best strategy is to merge, run the script, delete everything except the first image on the first page, then pick up the excess and auto-flux in the document.

  • How to get multiple records in a line and a different column

    Hi all

    I am using oracle database 11g

    and I have a two table table_1, table_2
    table_1 has columns

    emp_no
    first name
    middle_name
    last_name
    E-mail

    and table_2 have columns
    emp_no
    phone_type
    Phone_Number

    and having entires

    emp_no phone_type phone_number
    1001 MOB 9451421452
    1001 WEMG 235153654
    1001 652341536 EMG
    1002 MOB 9987526312
    1003 WEMG 5332621456
    1004 59612356 EMG

    Now I want the output of values with the MOB or WEMG phone type in a single line with different columns

    emp_no first_name last_name middle_name officeno mobile e-mail

    1001 score null k 9451421452 235153654 [email protected]
    1002 chagneau gary [email protected] 9987526312 null
    1003 dany craig [email protected] 5332621456 null null
    1004 donald finn sian [email protected] null null



    Can I have any input to achieve this?


    Concerning

    $sid

    Hi Sid,

    Under query will be help for you...

    SELECT tab1.emp_no
    *, first name *.
    *, middle_name *.
    *, last_name *.
    *, email *.
    *, mobile t2.phone_number *.
    *, t3.phone_number officeno *.
    OF tab1
    *, (SELECT Emp_no *)
    *, phone_number *.
    Of THE tab2
    WHERE phone_type = "MOB") t2
    *, (SELECT Emp_no *)
    *, phone_number *.
    Of THE tab2
    WHERE phone_type = "WEMG") t3
    WHERE tab1.emp_no = t3.emp_no
    AND tab1.emp_no = t2.emp_no;

    Thnks,
    cveluri

  • How to get the values separated by commas of multiple records in table

    How to get the values separated by commas of multiple records in table

    for example

    name address age sex
    a 12 m e
    b hh 12 f
    BB c 13 h

    I need to get output as a, b, c from a query

    Use the query as below he works for me, change the names of tables and columns

    SELECT SUBSTR (SYS_CONNECT_BY_PATH (PROXY_EMAIL, ','), 2) csv FROM (SELECT PROXY_EMAIL, ROW_NUMBER () ON the rn (ORDER OF PROXY_EMAIL), COUNT (*) NTC (STARS_PROXY_ASSIGNMENT) WHERE EMPLID = #EMPLID) WHERE rn = cnt START WITH rn = 1 CONNECT BY rn = rn + 1 ADVANCE

  • Insert multiple records in a form with checkboxes

    Hello

    I need to insert multiple records in a database of a form using Coldfusion and am stuck - it works correctly when inserting one record at a time. Basically, the user will choose their name of the employee (EmployeeID) in a dynamic list, then several session (open) numbers that represent classes of training.

    When I try and select several check boxes, I get this error:
    "The number of query values and destination fields is not the same."

    The boxes of the open field are not dynamic, as you can see-how use CFLOOP or any other method to allow several checkboxes be selected, and all open documents is entered into the database on a form?

    I used server behaviors Dreamweaver 8 to create the form - which is limiting I know but I'm not a coder. I hope I can add code here to do things correctly function.



    ----APPLICATION CODE------------------------------------------------------------------

    <!-get employee names->
    < cfquery name = "rsDisplayEmployee" datasource = "FormationRH" >
    SELECT *.
    OF tblEmployees
    ORDER BY LastName ASC < / cfquery >
    <!-->-->
    <! - insert Records - >
    < cfset CurrentPage = GetFileFromPath (GetTemplatePath ()) >
    < cfif IsDefined "(FORM. MM_InsertRecord") AND the FORM. MM_InsertRecord EQ 'form1' >
    < cfquery datasource = "FormationRH" >
    INSERT INTO tblEnrollments (open, EmployeeID)
    VALUES)
    < cfif IsDefined "(FORM. Open") AND #FORM. Open # NEQ "" > "".
    #FORM. Open #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ,
    < cfif IsDefined "(FORM. EmployeeID") AND #FORM. EmployeeID # NEQ "" > "".
    #FORM. EmployeeID #.
    < cfelse >
    NULL VALUE
    < / cfif >
    ) < / cfquery >
    < cflocation url = "2.cfm" >
    < / cfif >
    <!-->-->

    --------FORM CODE-----------------------------------------------------------------------

    < form action = "" < cfoutput > #CurrentPage # < / cfoutput > "id = 'form' name ="form"method ="POST">"
    < table width = "100%" border = "0" cellspacing = "0" cellpadding = "4" >
    < b >
    < td width = "100%" > < h2 > < strong > select an employee name < facilities > < / h2 > < table >
    < /tr >
    < b >
    < td > < select name = "EmployeeID" >
    < cfoutput query = "rsDisplayEmployee" >
    < option value = "#rsDisplayEmployee.EmployeeID #" > #rsDisplayEmployee.LastName #, #rsDisplayEmployee.FirstName # < / option >
    < / cfoutput >
    < / select > < table >
    < /tr >
    < /table >
    < h2 > < strong > select training class < facilities > < / h2 >
    < table width = "600" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "227" valign = "top" > class < table >
    < td width = "373" valign = "top" > < input name = "Open" type = "checkbox" value = "937" / >
    Date < table >
    < /tr >
    < b >
    < td valign = "top" > class < table >
    < td valign = "top" > < label >
    < input name = "Open" type = "checkbox" value = "936" / >
    < / label >
    Date < table >
    < /tr >
    < /table >
    < br / >
    < input type = "submit" name = "Submit" value = 'Sign Up!' / >
    < input type = "hidden" name = "MM_InsertRecord" value = "form" >
    < / make >

    "Add a line" I want to say that, for each of the checkboxes selected in your form, the code will be to insert a new record in the database table. Sorry I probably didn't phrase it very well.

    so, no, the code does not need to wrap around each element. Instead the code examines the form.fieldnames variable (form.fieldnames, which is a list separated by commas of all fields defined in the form, is automatically submitted to each form submission - you don't have to define yourself somehow) and for each selected checkbox will insert a new record in your table with the check box selected and selected value the value of the id of the employee.

  • validation against multiple records (section multiple registration)

    How can I validate the records in a record Multiple point (3 files) against multiple records in a database? In other words, if they have previously registered (and is committed to the database) 'A', 'B' and 'C' and then try to enter "C", "D" and "E", a trigger failure will occur because 'C' is recognized as being already in the database. I'm already having control of duplicate records of subject "during a session" via the form, but does not prevent a user to re - enter and update a different record with the same value as one of the other documents submitted previously. Does make sense? I guess I could control it at the database level, making the the user_id AND primary keys of point value, but I want to control it until the user selects the button "Update".

    This should check the records that are unique to that user only. Does make sense?

    Mark,
    You have a post request (PQ) trigger adding or modifying data when a record is being questioned? The when-validate-Item trigger (WVI) will run only when the State of the item is NEW or CHANGED. When you fill out your form with EXECUTE_QUERY(), the ITEM_STATUS should be query.

    If you use a trigger of PQ, would be to reset the record and status of the article once you set your value in the trigger of PQ. For example:

       SET_ITEM_PROPERTY('MY_BLOCK.MY_ITEM', ITEM_IS_VALID, PROPERTY_TRUE);
    

    Another option would be to set the status of all return to the QUERY.

      SET_RECORD_PROPERTY(:SYSTEM.trigger_record, STATUS, QUERY_STATUS);
    

    I hope this helps.
    Craig...

  • How to stop multiple self-switching to the address bar every time I open a new tab and try typing something anywhere outside the address bar?

    How to stop multiple self-switching to the address bar every time I open a new tab and try typing something anywhere outside the address bar? As something just wants me to use this integrated search when you type something non-Web-address in the address bar and press to enter. And the most ridiculous thing is that happens repeatedly on as every second, as I just got off the address bar and start typing again, but still he passes me in the address bar, then 3, 4 times like that. And the result is that I don't see the address of this page.

    I think that its has something to do with my AVG Antivirus, because it started the same time a Nation AVG started to appear in each new tab I opened (and which is irritating as me, I've read here on support.mozilla.org and it seems that the only solution is to completely reinstall Firefox, but I don't want to lose all my settings) but when I type something in the address bar and press enter It opens the search results in Google.

    Please try to help me, I love Firefox but I have to switch to Chrome until I fix this.

    Thanks in advance

    First of all, please update Firefox 32. 22 is no longer support is not safe. So, let us know if you still have this problem. Update Firefox to the latest version

  • First HP: how to enter a number complex, using single quotes

    Hello

    This is probably a stupid question, but how do you enter a charager apostrophe on the first HP RPN mode?

    I read the section in the guide of the user on enteringer a complex numbers in RPN mode.    Using (3.4) works fine, but I'm curious to know how to enter using the method indicated in the doc:

    "In RPN mode, complex numbers must be in single quotes and require an explicit multiplication.
    For example, 3-2 * i'. "

    For the life of me, I can't find the character of simple-qoute.     Maj 9' does not work.

    It's late and without a doubt, it is right in front of me, but I can't.   I feel a "time da come...» »

    Thanks in advance,

    OK, found it...      (Maj)

    (I cheated and google it)

  • How to print multiple images per page

    How to print multiple copies of a single image on a single page

    Duplicate the photo before you print it, and then select all copies, then use ⌘P to print the photo.

    To duplicate the photo select and enter the key ⌘D combination or use the menu entry "Image > Duplicate...» »

Maybe you are looking for