Update a table on one touch

Hello

I'm doing a simple APEX function that allows the user to click a button on the page that corresponds to a team. I use page processes once the button is pressed to increment the value of points for specific team in 1. An example of a process is:

Teams UPDATE

SET number_of_points = number_of_points + 1

WHERE team_colour = 'Blue ';

This piece of SQL is executed on sending the page and when the button is pressed.

Unfortunately, any button is pressed, all the page processes are triggered and all teams win when point. How can I make it possible for the process to perform only the team for which the button corresponds to.

Thank you very much!

check the work of application according to your requirement... (value increases while blue and green button)

Leave.

Tags: Database

Similar Questions

  • 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

  • No update OS on Alcatel One Touch fire

    The version of the OS on my Alcatel OTF is 1.1.0.0 - prerelease.
    If I understand the update of the OS is pushed by my phone provider (Alcatel).
    I have to be patient with the OS updates, or is there something wrong with the system?
    Can anyone give information on the frequencies of OS update?

    The current version is 1.1. Developers, engineers and we at support coordinate with them to launch the 1.2 update.

    Thank you!

  • No updates detected in Alcatel One Touch fire

    I have Firefos OS 1.0.1.0 - 01003 saw that Firefox 1.1 was released, I try to check for updates and it says that my system is up to date. I read somewhere that reboot the phone solves it, but it does not work.

    Why my system does not detect the update?
    What should I call my provider or manufacturer on this subject?

    Our developers, engineers and other departments Firefox OS are working with Alcatel and suppliers to get the update to you as soon as we can. We appreciate your patience and thank you for choosing to use Firefox OS.

  • I have just updated an Alcatel one touch fire to version 1.3 (firefox OS) and the market no longer charge

    I have just updated an Alcatel one touch fire to version 1.3 (firefox OS). Rigth after installation completed and restart, the market App has not loaded at all. He showed only a blank page and the exit button (x) that have nothing. I also tried to access market from the pre-installed browser (firefox), but the result was the same.
    E-mail has failed also. A message that a secure connection to the server imap.googlemail.com was not possible and that the certificate is not valid, appeared (something like that because it's in Greek). How can I fix these problems? If not, how I can return to the previous version (1.2) rll?

    Hello, can you check that your clock system, the date and time are always well positioned?

  • Alcatel one touch fire will not be updated.

    It's June 9, 2014 and my alcatel one touch fire works always firefox OS v1.1. Whenever I check updates, the phone said I use the latest version of something that is obviously not true. I can't understand why it will not be updated. Any help would be appreciated.

    Hello Ralph Daub.

    Thank you for the information provided. They have certainly helped me to better understand the situation.

    I realize that Firefox OS starts a mobile OS compared to its competitors and it will run in a few hiccups.

    But anyway, I'll be patient until v1.3 gets properly evaluated and rolled on my device.
    Thank you for your support.

    -randomffuser

  • Process in two different tables in one page

    Hi all

    I have A form with a submit button, when I click on the button I want to send the data from two different tables. For example:

    REQ_ID: 221

    BOX_NUMBER: 2

    NOM_ELEMENT: APPLE

    COUNTRY_ORIGIN: USA

    I want to send all the information in table 1 and only REQ_ID and BOX_NUMBER in table 2.

    I tried to create processes two different which are:

    1. the usual process line DML for table 1 and;

    2. simple query 'Insert' SQL for table 2

    It seems fine, until I realized that when the user tries to update the BOX_NUMBER to 10 for example, only 1 table is updated and table 2 creates an another duplicate data instead of updating the old one! This also applies to my button Delete,.

    any idea to fix this problem?

    Thank you very much

    Vika

    Reread what you wrote and you would realize why 2nd table only "new lines".

    2. simple query "Insert into ' SQL for table 2

    If you need to UPDATE the table, then you must write a simple UPDATE statement.

    If you want to REMOVE from the table, then you must write a simple DELETE statement.

    I call this "DML DIY" - do it yourself DML

    (personally, I'd probably use MERGE for INSERT and UPDATE)

    MK

  • How do I update the table in Jdev

    Hello

    I use Jdev 11.1.1.7.1.

    The control of data, I added that ADF only read the table. When I click on the button create and return to the report screen, highlight lines are added.

    Highlighted those who is not inserted into the DB table but he showed in the report. How to remove it. How can I update the table?

    Kindly advice me.

    Thank you

    Swathi

    That's what I got:

    -You have a table read-only, and a link to create.

    -When you press the link create a popup will be launched with a new record (may be a form in the same table iterator).

    -When you press save to save the changes validation triggers, stop you to insert the record.

    -After the fire of validation you will close the pop-up window (by pressing icon or by pressing Cancel).

    -After closure of the pop-up window, you will find that reading one table has some blank lines.

    If it is your problem if you have 2 choices:

    1. in the AppModule you can make a new instance on the view object (to which redirect the table) If your view object called 'EmployeesView', so, in AppModule, you should have EmployeeView1 and EmployeeView2 and your table may point to EmployeeView1, and when you create new line create in EmployeeView2 and after completing the creation you can run the query and then refresh the table (as shown in the following code).

    2 - the second option in the popup cancelListener link at the rear bean method then you can update the table by program as:

        DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("TableIteratorName"); // from pageDef.
        iter.getViewObject().executeQuery();
        RequestContext.getCurrentInstance().addPartialTarget(getTableComponent());// from table Binding property bind it to object in back bean
    
  • How to update the table with the number management

    Hello

    I need as there is a loc_tab of the created table as below,

    CREATE TABLE loc_tab
    (
    Country_ID NUMBER,
    country_code VARCHAR2 (3),
    country_name VARCHAR2 (50).
    State_ID NUMBER,
    state_code VARCHAR2 (3),
    state_name VARCHAR2 (50).
    city_id NUMBER,
    city_code VARCHAR2 (3),
    city_name VARCHAR2 (50)
    );

    I inserted records like below,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
    
              IND          INDIA                    TN          TAMIL NADU          CHN          CHENNAI
              IND          INDIA                    TN          TAMIL NADU          TRI          TRICHY
              IND          INDIA                    TN          TAMIL NADU          CMT          COIMBATORE
              IND          INDIA                    TN          TAMIL NADU          MDU          MADURAI
              IND          INDIA                    AP          ANDHRA PRADESH          HYD          HYDERABAD
              IND          INDIA                    AP          ANDHRA PRADESH          SEC          SECUNDRABAD
              AUS          AUSTRALIA               QLD          QUEENSLAND          BRI          BRISBANE
              AUS          AUSTRALIA               TAS          TASMANIA          HB          HOBART
              AUS          AUSTRALIA               TAS          TASMANIA          CCE          CITY OF CLEARANCE
              AUS          AUSTRALIA               TAS          TASMANIA          BUR          BURNIE
    Now, I wanted to update the table such that all ID columns are updated with running number.

    Each ID columns should get incremented so that, for Country_ID column corresponding to "India" If country_id is 1, that there must be one for all the lines with the name as "India". Likewise for "Australia".

    In the case of State, she also has the same logic with numbers repeated until the very name of the State comes.

    For the city, it of course will hold separate ID only because the name of the city will not get duplicated.

    This update must be done in the normal way using simple SQL such as no PLSQL don't like looping, etc... is involved.

    Here are the contents of the table, and that's how the table should be updated,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
                                            
    1          IND          INDIA          1          TN          TAMIL NADU     1     CHN          CHENNAI
    1          IND          INDIA          1          TN          TAMIL NADU     2     TRI          TRICHY
    1          IND          INDIA          1          TN          TAMIL NADU     3     CMT          COIMBATORE
    1          IND          INDIA          1          TN          TAMIL NADU     4     MDU          MADURAI
    1          IND          INDIA          2          AP          ANDHRA PRADESH     1     HYD          HYDERABAD
    1          IND          INDIA          2          AP          ANDHRA PRADESH     2     SEC          SECUNDRABAD
    2          AUS          AUSTRALIA     1          QLD          QUEENSLAND     1     BRI          BRISBANE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     1     HB          HOBART
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     2     CCE          CITY OF CLEARANCE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     3     BUR          BURNIE
    Thank you and best regards,
    Shiva
  • How to keep the source of updated model table?

    Hello


    Database MS SQL source-
    Target - Oracle


    I have a reverse engineering source and tables targets say 'src_table' and 'trg_table' respectively. The data are available in src_table. I have implemented an interface named "Load_Interface", which loads the data from the source of 'src_table' to
    'trg_table '. My Interface works very well. But I have one query, assume that my source (in the database not in ODI) update table.

    Should I do reverse engineering on the source model again to update the 'src_table' in the model of ODI?

    Because I want to run this interface on the daily basis. Is it possible to src_table automatically update once updated the table in MS SQL?

    Thank you
    Shrinivas

    Hi Shrinivas,

    Is not mandatory, you can run the interface and get settled.

    Some of the approach that you can follow,

    1. use IKM incremental update to capture him and the calendar frequently.

    2. use the CDC to capture these modified from the source data.

    http://odiexperts.com/tag/simple-CDC

    3 use the ODI utilities to trigger the interface once new data has arrived (OdiWaitForLogData, OdiWaitForData etc.)

    Thank you
    Guru

  • How to update a table and insert into another

    I need to update a table and also to insert into another table and want to do it in the same form. I can it will break in 2 different forms, but it is awkward for the user. Is there a way common to this address? As a backdrop, the user is updated the status of a message (IE, changing it from open to closed) and then provide an answer. The response table is separate from the table of messages because its format is doing different.

    Thank you and sorry to bombard the forum today.

    .oO (davidbarrackphoto)

    > I need to update a table and also to insert into another table and want to
    > do it in the same form. I can it will break in 2 different forms, but it is
    > awkward for the user. Is there a way common to this address?

    You can do what you want in your form processing script. But for
    much more advanced than you must write your own code.

    > As a backdrop.
    > the user updates the status of a message (IE, changing it from open to closed)
    > and then provide an answer. The response table is separate from the table of messages
    > because its format is doing different.

    Just curious: what is the difference? IMHO, there should be only one table
    for messages. Can you post more details about it?

    Micha

  • Offer to do an insert on a table and an update on table

    I'm trying to perform and insert on the table a table (created by the form wizard that will insert on the table that I created using the Wizard) and on the form is on field in another table. Therefore, I am trying to perform an update on an attribute of a table and one insert into another table. How do I in apex?

    Hello Dear,

    I think that the OP request can be satisfied by the simple before the insert trigger. Is it not?

    your
    Dr.s.r.bhattachar

  • Update target tables...

    Hello

    I'm actually in a difficult situation. I need to update a table with a view. The table has 3 columns (* col1, col2, col3 *) initialized as NULLs in all records, noting that the other columns are given inside... So what I'm basically doing is this:

    I maps the columns to display in the table and click on the table to display the table operator properties, then set the type of loading for UPDATE. Then under a conditional loading in the filter of the target for the update , I have inserted the following condition:

    (INOUTGRP1.*col4 * IS NOT NULL) which shows a successful validation.

    Taking into account the constraints Match is chosen to be NO_CONSTRAINTS...

    After that I click on col1, col2 and col3 respectively to put the Match column when new line Yes...

    Unfortunately, these warnings will appear saying the following:

    + VLD-2753: all mapped attributes are used in corresponding to the criteria of 15_REC.

    It will be a meaningless update action if all attributes are mapped are used for matching. The update statement selects rows that meet the condition of correspondence and be updated with the same values. Specify at least one mapped attribute of my_table to use for updating by setting use update for Matching No.: ( COL1 COL2 COL3). +


    + VLD-2761: impossible to generate the Merge statement.

    MERGE statement cannot be generated because the COL4 column is used for correspondence and updating. A column can be updated in a merge statement. +



    So if anyone has any kind of idea help as soon as possible... Since it is in fact urgent...

    Thanks a lot already recognizing in reading.
    Hossam

    "Merge statement cannot be generated because the COL4 column is used for correspondence and updating. A column cannot be updated in a merge statement.

    You have to column 4, set the Match column when new line no. and update column Yes?

    Concerning
    Nico

  • call sub procedure for updating the table - need help

    Hi all

    I have a scneario wherein I get three values 0,2.5 and 57.
    For each value, I'll call another procedure that updates a table "sample_dest".
    The "sample_dest" table has a column "dest_nbr."

    Now, for each three values I get,
    I want to update only one record in the table 'sample_dest '.

    for example, I want to update the column "dest_nbr" with a value of 59.5 (0 + 2.5 + 57).

    I am unable to do this, because every time the procedure is called,
    the previous values are not stored. 57 is the last value I get,
    I am able to store only 57. But I want 59.5 to be updated in the table.

    How can I achieve this.
    Help, please.

    Concerning
    Rambeau.

    This should be done in a single sql statement, not in a loop of cursor (which is what it looks like you're doing). If sample_desc already contains records for samples, so it should look like:

    UPDATE sample_desc sdesc
    SET desc = (SELECT AVG(code) FROM sample_dest sdest
                WHERE sdesc.sample = sdest.sample)
    WHERE EXISTS (SELECT 1 FROM sample_dest sdest
                  WHERE sdesc.sample = sdest.sample)
    

    If sample_desc does not already contain records (unknown from your description), then it would be an insert as:

    INSERT INTO sample_desc
    SELECT sample, AVG(code)
    FROM sample_dest sdest
    GROUP BY sample
    

    John

  • alcalel one-touch 5005 X driver free download

    My pc don't see my alcatel5005x one touch on USB mobitel. How to get a driver

    Hello

    You get a driver for the phone from the phone manufacturer.

    Contact the manufacturer:

    http://en.Wikipedia.org/wiki/Alcatel_Mobile_Phones

    Alcatel Mobile Phones are a brand of mobile phones. It was created in 2004 in a joint venture between Alcatel-Lucent France and TCL Communication of China.

    TCT Mobile Limited (former name: T & A mobile phones Limited) is a member of the TCL Communication listed on the Hong Kong Stock Exchange (HKSE: 2618) which was created in August 2004 by TCL Communication and Alcatel. [1]

    TCT Mobile Limited manages three business units: ALCATEL Mobile Phones, mobile phones, TCL and Brand Design Lab

    See you soon.

Maybe you are looking for