Update the Table with the push button

Hi I want to update my table using the push button that requires a transfer of account

For example a single account transactions into 2nd account


I used this query, but his does not work

Update of cb
Set cb_acc_id =: block3.acc_id_target
where
cb_acc_id =: block3.acc_id_source;



Concerning

Wasim Ismail

You may forgot to validate your update...

BTW:
your form will not recognize, you start a transaction and make an update in the database.

Tags: Oracle Development

Similar Questions

  • change the push button for control or indicator at run time

    Hello

    I have a lamp that can turn into power according to the value of a Boolean variable.

    There are two ways in which I can control the lamp.

    (1) manual mode in which the button must be used as control to change the value of the Boolean variable.

    2 auto mode) in which the value of the variable is changed programmatically. Push button must return to an indicator to indicate the value of the Boolean variable.

    I should be able to swith bw manual and automatic mode for the duration and the push button should switch to control and indicator respectively.

    For those who might wonder why it's necessary: there is a sign which must be controlled in manual/auto mode. in manual mode, operator will manually use the buttons as controls for updating the control variables, in auto mode, my control algorithm updates the variables, and the Organizer must be able to see which button is pressed and when. If the button should be the control of update of variables in manual mode and must be the indicator of the evolution of the variables in auto mode.

    How is that possible?

    A basic VI with three objects are attached, and the Boolean control variable is global.

    Did.

  • We can create a view or table with a form button?

    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Gul says:
    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Yes. You can. Use the FORMS_DDL built-in. For example

    BEGIN
      Forms_DDL('create table temp(n NUMBER)');
      IF NOT FORM_SUCCESS THEN
        Message ('Table Creation Failed');
      ELSE
        Message ('Table Created');
      END IF;
    END; 
    

    Hope this helps

    Hamid

  • Best way to update a table with separate values

    Hi, I would really appreciate some advise:

    I need to regularly perform a task where I update 1 table with all the new data that has been entered in another table. I cannot perform a complete insert because this will create data duplicated each time it works, so the only way I can think of is the use of cursors in the script below:


    CREATE OR REPLACE PROCEDURE update_new_mem IS
    tmpVar NUMBER;

    CURSOR c_mem IS
    SELECT nom_membre, member_id
    OF gym.members;
    CREC c_mem % ROWTYPE;


    BEGIN
    OPEN c_mem.
    LOOP
    SEEK c_mem INTO crec;
    EXIT WHEN c_mem % NOTFOUND;
    BEGIN
    UPDATE gym.lifts
    Name = crec.member_name
    WHERE member_id = crec.member_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    END;
    IF SQL % NOTFOUND THEN
    BEGIN
    INSERT INTO gym.lifts
    (name, member_id)
    VALUES (crec.member_name, crec.member_id);
    END;
    END IF;
    END LOOP;
    CLOSE C_mem;

    END update_new_mem;



    This method works, but y at - it a (faster) easier way to update another table with new data only?

    Thank you very much

    >
    This method works, but y at - it a (faster) easier way to update another table with new data only?
    >
    Almost anything would be better than this treatment of slow-by-slow loop.

    You don't need a procedure, you should just use MERGE for this. See the examples in the section of the MERGER of the doc of the SQL language
    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_9016.htm

    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*.01)
         WHERE (S.salary <= 8000);
    
  • Update of table with 14 million records

    good day, I'm updating a table with 14 million documents column. using the data from another table.
    This takes terrible time just updated to 500,000 over the weekend, which is unacceptable.
    ideas to improve my code and get the fastest update is much appreciated.

    DECLARE
    TYPE vc_type is table of index varchar2 (20) by pls_integer;
    type tabtype_rowid is table of pls_integer rowid indexes;
    my_cur sys_refcursor;
    cur_limit integer: = 10000;

    tab_rowid tabtype_rowid;

    Start
    OPEN FOR My_cur
    SELECT value, rowid
    TABLE 1A

    where the value IS NOT NULL
    and id is null;


    loop
    collect the fetch my_cur in bulk in tab_value, cur_limit limit tab_rowid;

    FORALL k IN 1.tab_npi.count

    UPDATE table 1A
    A.ID = (select id SET
    in Table 2b
    where value = tab_value (k)
    and rownum = 1
    )
    WHERE a.rowid = tab_rowid (k);

    COMMIT;

    When the output tab_value.count < cur_limit;.
    end loop;

    END;


    Thank you

    903537 wrote:
    I tried to update basic training, as a first step and it crashed...

    He didn't fail, it failed.

  • Update of table with invalid identifiers

    Hello!

    I use a third-party plug-in and that comparisons of chemical structures. I want to update a table with the values of the other when the plugin matches two rows. However, I'm a problem invalid identifier.

    Two tables:
    PLATES: a VARCHAR2 columns of PLATE_SMILES, IN_DB
    INVEST: a VARCHAR2 columns of SMILES

    The operator is a binary: jc_compare (PLATE_SMILES, SMILES) = 1 (or 0 if they do not match)

    I want my query to say: "If comparison SMILES, PLATE_SMILES = 1, define IN_DB = 1 for row" - effectively asking if PLATE_SMILES exists in the table INVEST.

    I tried a number of "renditions", all identifiers not valid donations. Here is an example:

    Update (select plate. PLATE_SMILES, plate. IN_DB, invest. SMILES
    plate PLATES
    INVEST invest
    WHERE jc_compare (PLATE_SMILES, SMILES) = 1)
    set plate. IN_DB = 1;


    ORA-00904: "FLAT". "" IN_DB ": invalid identifier


    I hope that this should be an easy fix, and any help is greatly appreciated!

    Hello

    You have

    UPDATE (SELECT plate.plate_smiles,
                   plate.in_db,
                   invest.smiles
            FROM   plates plate, invest invest
            WHERE  jc_compare ( plate_smiles, smiles) = 1)
    SET    plate.in_db = 1;   -- Error here
    

    PLATE is not known outside the display online. Just remove it.

    Concerning
    Peter

  • update of table with similar registration information using the same key

    Version: 11.1.0.7.0

    We have large table probably 30 M records

    -test code table follows

    create table people)

    person_id number,

    first name varchar2 (50).

    middle_name varchar2 (50).

    last_name varchar2 (50)

    );

    insert into persons (person_id, first_name, last_name, middle_name) values (1, 'JOHN', 'A', 'DOE');

    insert into people (person_id, first_name, last_name, middle_name) values (1, 'JOHN', ","DOE");

    insert into persons (person_id, first_name, last_name, middle_name) values (1, 'JOHN', 'ADAM', 'DOE');

    insert into persons (person_id, first_name, last_name, middle_name) values (2, 'JOHN', ' C ', 'DOE');

    insert into people (person_id, first_name, last_name, middle_name) values (2, 'JOHN', ","DOE");

    insert into people (person_id, first_name, last_name, middle_name) values (3, 'JOHN', ","MOE");

    insert into persons (person_id, first_name, last_name, middle_name) values (3, 'JOHN', 'FRANK', 'MOE');

    I am trying to write more efficient code to take the middle name of the most complete and updated all records with the same KEY (person_id) with her.

    Expected result:

    1, JOHN, ADAM, DOE

    1, JOHN, ADAM, DOE

    1, JOHN, ADAM, DOE

    2, JOHN, C., DOE

    2, JOHN, C., DOE

    3, JOHN, FRANK, MOE

    3, JOHN, FRANK, MOE

    Hello

    Here is an example of the use of the aggregate LAST instead of the function ROW_NUMBER analytic function:

    MERGE INTO dst people

    WITH THE HELP OF)

    WITH got_longest_middle_name AS

    (

    SELECT person_id

    , MIN (middle_name) DUNGEON (DENSE_RANK LAST ORDER OF LENGTH (REPLACE (middle_name, '.')))

    AS longest_middle_name

    AMONG the people

    WHERE middle_name IS NOT NULL

    GROUP BY person_id

    )

    SELECT person_id

    longest_middle_name

    Got_longest_middle_name c - c is for candidates

    WHERE DOES NOT EXIST)

    SELECT 1

    AMONG the people

    WHERE person_id = c.person_id

    AND c.longest_middle_name NOT AS REPLACE (middle_name, '.'). '%'

    )

    )             src

    WE (dst.person_id = src.person_id)

    WHEN MATCHED THEN UPDATE

    SET dst.middle_name = src.longest_middle_name

    WHERE dst.middle_name <> src.longest_middle_name

    OR dst.middle_name IS NULL

    ;

    I suspect that this may be a little faster, but try it on your system with your data to make sure.

  • Table of indexing with a push button

    Hello

    I'm doing a round table where the size of the array is 5. I'm looking for entries if we can do the same thing with them using a whole loop and the timer, but with a push of a button. Attached is the code I'm working with.

    Thank you.

    I used a structure of the event.  Also, I replaced the structure of your business with the Quotient and the rest VI.

  • Press the push button and form go does not

    I have a non block tabular data type that has the following text fields with a field button named 'delete '.


    | ECO | TLIGNE | LDATE | REMOVE |



    Now we put LDATE in there, forms, TLIGNE and ECO agrees and goes to the next record.
    But if the folder already exists we can press the button remove the deletion of the existing record.

    I after statement behind the button Delete

    delete from at_rcrg where = eco: eco and ldate =: ldate;
    commit;

    but when I press this button the form go responds and never unresponsive State.
    What is the solution?

    Try this...

    delete from at_rcrg where eco=:eco and ldate=:ldate;
    commit;
    clear_block;
    

    Hope this helps

  • Update a table with one column of another

    Oracle 11g
    Hello

    i'im trying to update the two columns of table SUPPORT (SUPPORT_X, SUPPORT_Y) with two columns of table POST_HTA_BT (POSTHTABT_GPS_X, POSTHTABT_GPS_Y)

    Understand that the two tables have the colum below:

    SUPPORT (SUPPORT_ID, SUPPORT_PLAQUE, POSTHTABT_ID, SUPPORT_X, SUPPORT_Y,...)

    POST_HTA_BT (POSTHTABT_ID, POSTHTABT_GPS_X, POSTHTABT_GPS_Y,...)

    The SUPPORT_PLAQUE has type varachar. Except the keys, the other columns are varchar type in both tables.

    The point here is to update the support_x, support_y with posthtabt_gps_x and posthtabt_gps_y.But before the update we have Sheik if the fifth number of the support plate is a number of characters from "0" to "9"and the rest of the caracter of the support_plaque is '00000'

    Please note that the support_plaque is stored in the table with the form: "0025800000!"

    So I did the below script, I try to execute in sql develop.

    SET SERVEROUTPUT ON

    DECLARE
    chiffre_liste varchar (200): = '0 ', '1', '2', '3', '4', ' 5 ', ' 6' ', 7', ' 8 ', ' 9';
    CURSOR CUR_GPS_SUPPORT IS
    Select MEDIA. SUPPORT_X, SUPPORT. SUPPORT_Y, POSTE_HTA_BT. POSTHTABT_ID, SUPPORT. EXPL_ID,
    SUPPORTED. SUPPORT_PLAQUE, POSTHTABT_GPS_X, POSTHTABT_GPS_Y
    support,.
    POSTE_HTA_BT
    where
    SUPPORTED. SUPPORT_X IS NULL and
    SUPPORTED. SUPPORT_Y IS NULL and
    SUPPORTED. POSTHTABT_ID = POSTE_HTA_BT. POSTHTABT_ID and
    SUPPORTED. EXPL_ID = POSTE_HTA_BT. EXPL_ID
    Order of SUPPORT. POSTHTABT_ID;

    w_POSTHTABT_ID POSTE_HTA_BT. Type of POSTHTABT_ID %;
    w_SUPPORT_X SUPPORT. TYPE % SUPPORT_X;
    w_SUPPORT_Y SUPPORT. TYPE % SUPPORT_Y;
    w_EXPL_ID SUPPORT. TYPE % EXPL_ID;
    w_SUPPORT_PLAQUE SUPPORT. TYPE % SUPPORT_PLAQUE;
    w_POSTHTABT_GPS_X POSTE_HTA_BT. TYPE % POSTHTABT_GPS_X;
    w_POSTHTABT_GPS_Y POSTE_HTA_BT. TYPE % POSTHTABT_GPS_Y;

    BEGIN
    DBMS_OUTPUT. Put_line ('loading the coordoonnees GPS - GPS Coord update takes care of starting ');

    FOR HEART LOOPING CUR_GPS_SUPPORT

    w_POSTHTABT_ID: = cur. POSTHTABT_ID;
    w_SUPPORT_PLAQUE: = cur. SUPPORT_PLAQUE;
    w_SUPPORT_X: = cur. SUPPORT_X;
    w_SUPPORT_Y: = cur. SUPPORT_Y;
    w_POSTHTABT_GPS_X: = cur. POSTHTABT_GPS_X;
    w_POSTHTABT_GPS_Y: = cur. POSTHTABT_GPS_X;

    If substr (cur.support_plaque, 5, 1 chiffre_liste) and substr (cur.support_plaque, 6, 5) = '00000'
    w_SUPPORT_X: = CUR. POSTHTABT_GPS_X
    w_SUPPORT_Y: = CUR. POSTHTABT_GPS_Y
    END if;
    EXCEPTION WHEN NO_DATA_FOUND THEN w_SUPPORT_X: = NULL and w_SUPPORT_Y: = NULL;
    END;

    -Updated the table of the supports
    Update SUPPORT
    Set SUPPORT_X = w_SUPPORT_X,
    SUPPORT_Y = w_SUPPORT_Y
    where SUPPORT_PLAQUE = w_SUPPORT_PLAQUE;
    -On valid imm? immediately
    commit;
    EXCEPTION when no_data_found then null;
    -No details found
    END;

    END;
    /

    and I got the following errors:

    Error report:
    ORA-06550: line 2, colum 34:
    PLS-00103: symbol ',' met instead of one of the following symbols:

    * & = - + ; <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | submultiset of type multiset Member
    ORA-06550: line 2, column 52:
    PLS-00103: symbol ';' met instead of one of the following symbols:

    ), * & = - + <>/ is mod remains not rem = >
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | Member of multiset must
    ORA-06550: line 38, colum 48:
    PLS-00103: symbol 'CHIFFRE_LISTE' met instead of one of the following symbols:

    (
    Symbol "(" a été substitué à "CHIFFRE_LISTE" verser continuer.) "
    ORA-06550: line 39, 12 colum:
    PLS-00103: symbol 'W_SUPPORT_X' met instead of one of the following symbols:

    ), * & -+ / at rem mod < Hurst (*) > rest and or.
    multiset
    ORA-06550: line 40, 12 colum:
    PLS-00103: symbol 'W_SUPPORT_Y' met instead of one of the following symbols:

    . (), * @ % & = - + <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | mult
    ORA-06550: line 41, colum 9:
    PLS-00103: symbol 'END' met instead of one of the following symbols:

    . (), * @ % & = - + <>/ is mod remains not rem
    <>< Hurst (*) > or! = or ~ = > = < = <>and like2 or
    like4 likec between | multiset members
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:

    I checked the line number, but do not see the error in my code.

    Please could you help me?

    peace

    Hello

    glad to know that it worked. In fact, I don't see the reason to make these complicated processes.

    Remember the mantra:

    • If you can do it with SQL then do it with SQL

    Good evening!

    Alberto

  • Removal of MSQL 2 tables with a single button

    As I was able to add data from two tables mysql with a single button, I guess I should be able to delete the two entries in a similar way, but I can't seem to get there. The code is written in large part by DW and I have only the level minimum idea of the meaning of the php, so please be patient in no explanation as to where I'm wrong!
    At the present time, to the chk_sixmonth of the table entry is removed, but at table cel_contents incorrect records are deleted.
    The corresponding code is, I think;
    If ((isset($_POST['ck_pk'])) & & ($_POST ['ck_pk']! = "") & & (isset($_POST['gone']))) {}
    $deleteSQL = sprintf ("DELETE FROM chk_sixmonth WHERE ck_pk is %s",
    GetSQLValueString ($_POST ['ck_pk'], "int"));

    @mysql_select_db ($database_tormented3, $tormented3);
    $Result1 = mysql_query ($deleteSQL, $tormented3) or die (mysql_error ());

    $deleteGoTo = "chk_insert.php";
    If (isset {}
    $deleteGoTo. = (strpos ($deleteGoTo, '?'))? « & » : « ? » ;
    $deleteGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $deleteGoTo));
    }

    If ((isset($_POST['cel_pk'])) & & ($_POST ['cel_pk']! = "") & & (isset($_POST['gone']))) {}
    $deleteSQL = sprintf ("DELETE FROM cel_contents WHERE cel_pk is %s",
    GetSQLValueString ($_POST ['cel_pk'], "int"));

    @mysql_select_db ($database_tormented3, $tormented3);
    $Result1 = mysql_query ($deleteSQL, $tormented3) or die (mysql_error ());

    $deleteGoTo = "chk_insert.php";
    If (isset {}
    $deleteGoTo. = (strpos ($deleteGoTo, '?'))? « & » : « ? » ;
    $deleteGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $deleteGoTo));
    }

    $colname_rstSix = "1";
    If (isset($_GET['scrap'])) {}
    $colname_rstSix = (get_magic_quotes_gpc())? $_GET ["scrap"]: addslashes($_GET['scrap']);
    }
    @mysql_select_db ($database_tormented3, $tormented3);
    $query_rstSix = sprintf ("SELECT * FROM chk_sixmonth WHERE ck_pk = %s", $colname_rstSix);
    $rstSix = mysql_query ($query_rstSix, $tormented3) or die (mysql_error ());
    $row_rstSix = mysql_fetch_assoc ($rstSix);
    $totalRows_rstSix = mysql_num_rows ($rstSix);

    $colname_rstCont = "1";
    If (isset($_GET['scrap2'])) {}
    $colname_rstCont = (get_magic_quotes_gpc())? $_GET ['scrap2']: addslashes($_GET['scrap2']);
    }
    @mysql_select_db ($database_tormented3, $tormented3);
    $query_rstCont = sprintf ("SELECT * FROM cel_contents WHERE cel_pk = %s", $colname_rstCont);
    $rstCont = mysql_query ($query_rstCont, $tormented3) or die (mysql_error ());
    $row_rstCont = mysql_fetch_assoc ($rstCont);
    $totalRows_rstCont = mysql_num_rows ($rstCont);
    ? >
    <! DOCTYPE etc...

    < form action = "" method = "post" name = "scrap" id = "scrap" > "
    < input name = "gone" type = "checkbox" id = "gone" value = "gone" / >
    < input type = "submit" name = "Submit" value = "Remove" / >

    < input name = "ck_pk" type = "hidden" id = "ck_pk" value = "<?" PHP echo $row_rstSix ["ck_pk"];? ">" / >
    < input name = "cel_pk" type = "hidden" id = "cel_pk" value = "<?" PHP echo $row_rstCont ["cel_pk"];? ">" / >
    < / make >
    Thanks for any help

    Problem has now well sorted.

  • How can I update this table with values from another table?

    Hello

    I have a table 'governed '. I want to replace the values in the column "regies.agent" by the value of the column "regies_personnes.id."
    As you can see the tables have a column of common values. IE regies.agent = regies_personnes.nom

    Table 'governed ':
    Insert into 'authorities' (AGENT) values ('Humberdot Alain");
    Insert into 'authorities' (AGENT) values ("Danard Patrick");

    Table 'regies_personnes ':
    Insert into REGIES_PERSONNES (NAME, ID) values ("Humberdot Alain", 1);
    Insert into REGIES_PERSONNES (NAME, ID) values ("Danard Patrick", 2);

    Before having it
    SQL > select agent of authorities;
    Humberdot Alain
    Patrick Danard

    After the update, the result should be
    SQL > select agent of authorities;
    1
    2

    Thank you for your kind reply.

    You can

    update regies r set agent = (select id from regies_persones p where r.agent = p.nom)
      where exists (select id from regies_persones p where r.agent = p.nom)
    
  • update a table with sequence colmn

       how to update a colmn of table with sequence 
    
       e.x 
       
    COLMN1     COLMN2
    A     
    D     
    RTR     
    XX
    G     
    
    how to update colm2 like 
    
    COLMN1     COLMN2
    A               1
    D               2
    RTR               3
    XX              4
    G               5
    update tab set col2 = rownum;
    commit;
    
  • Update a table with a query that uses the table updated

    Hi This is my request. It's a mistake, but I hope that the basic idea may carry out. Cost_before_Decision is a column by using an alter table statement, I added:
    UPDATE fraud_nov_14_final
    SET Cost_before_Decision = (select Cost_Prior 
                                from    fraud_nov_14_final ff
                                      ,(select cla_case_no, sum(case when decline = 1 or decline = 2  
                                                                  THEN (nvl(total_cost_adj_old,0) + nvl(decline_estimate,0)) 
                                                                  ELSE Total_Cost 
                                                                  END) Cost_Prior
                                        from reporting.ci_final@test
                                            group by cla_case_no) z
                                                    where ff.cla_case_no = z.cla_case_no)
    Error I get is:
    Error report:
    SQL error: ORA-01427: einreihig subquery returns multiple rows
    01427 00000 - "einreihig subquery returns several lines.

    Thanks in advance for your help:

    Banner:
    Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Try this

    update fraud_nov_14_final a
       set cost_before_decision = (
                        select cost_prior
                          from (
                             select cla_case_no, sum(case when decline = 1 or decline = 2  then (nvl(total_cost_adj_old,0) + nvl(decline_estimate,0)) else total_cost end) cost_prior
                               from reporting.ci_final@test
                             group by cla_case_no
                               ) b
                                   where a.cls_case_no = b.cls_case_no
                         )
    
  • How to disable the push button

    I have a block emp with empno, ename, Dept. No. filed.
    I added a button,

    This push buton will make a calculation if it is pressed.

    This button should be enabled only if the input data is saved. If data entry is in progress should not be available foruser

    Please indicate where and what level I should write code below

    sET_ITEM_PROPERTY ("Digital", VISIBLE, PROPERTY_TRUE);

    Hi O.Developer,

    Create just "one TIME-NEW-POINT-INSTANCE" trigger on level block with the code below.

    Start
    If: system.block_status = 'CHANGED' then
    set_item_property ('pushbotton', Enabled, PROPERTY_FALSE);
    on the other
    set_item_property ('pushbotton', Enabled, PROPERTY_TRUE);
    end if;
    end;

    Kind regards
    Omer

Maybe you are looking for