How to update the table by using the value of a column in a table field

Hi all
use APEX4.1,
I have a tabular presentation based on the HOLIDAY table, it contains the following fields,
Leave_id
Employee_name
No_of_days
Status
Here's the column LOV updateable status.
Lov includes 2 values IE APPROVE and REJECT

and I have another Table called LEAVE_HISTORY, it contains the following fields.
Emp_name
status
Here whenever the ststus is updated (click the button SUBMIT) in tabular form should also be updated in the LEAVE_HISTORY of the SITUATION of the table column.

I tried the following in the process of "WE SUBMIT AFTER CALCULATIONS AND VALIDATIONS,"
begin
update LEAVE_HISTORY set status= status where upper(employee_name)=upper(emp_name);
end;
but it is not kept up-to-date,
When we updated through forms we can use something like this,
update LEAVE_HISTORY set status= :P200_status where upper(employee_name)=upper(:P_200_emp_name);  <----here we are referring page item i.e (:P_200_emp_name)
as the code above, how to run the columns in a table?
Thank you.

Hi Gurujothi,

Try this,

begin
update LEAVE_HISTORY
set status= :STATUS
where upper(Emp_name)=upper(:EMPLOYEE_NAME);
end;

Brgds,
Max

Tags: Database

Similar Questions

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to update the value of a value in a table

    APEX - 4.1.0.00.32
    Version of DB - 10 g
    Web - OHS server architecture
    Browser - IE8
    Theme - 9

    Hello

    I have a tabular form and I want to update the value of a field using a process based on an add-on.

    the name of the column in the form of tables is (name of column P22_PROJECT_ID)

    The error I get is

    ERR-1002 unable to find point item ID 'P22_PROJECT_ID' in the application "103".

    Error unexpected, unable to find the name of the option at the page or application level.

    The field is questioned as

    Select pt.project_id P22_PROJECT_ID

    The code I'm trying to use in the process is

    : P22_PROJECT_ID: =: P10_PROJECT_ID;

    I also tried without the colon (P22_PROJECT_ID), but the application does not recognize.

    Any help would be appreciated.

    Thank you

    the tables for is on page 22?
    the project in page 10

    I think you go to page 22 page 10
    Create a new item in page 22 as p22_project_id
    Since 10 passes as a parameter the page p1o_project_id and set p22_project_id

    by default as p22_project_id

  • How to set the value of a column in a table according to another column?

    Hello world!

    I use Apex 4.1.
    My question is how can I set the value of a column in a table according to another column?
    I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    I tried to use javascript as
     $('input[name=f02]').live('change', function(){
    if($(this).val()!='1'){
    $('input[name=f03]').val("test")}
    }); 
    for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.

    Can someone give me a hint in any way to do this if possible?

    Kind regards
    drama9346

    You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:

    and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:

    DECLARE
       --putting x01 in a var to simplify
       l_test_var VARCHAR2(200) := apex_application.g_x01;
       l_return VARCHAR2(200);
    BEGIN
       -- a simplistic test
       IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN
          l_return := 'String is between 10 and 20';
       END IF;
    
       --this will write l_return to the buffer, and the ajax callback will receive this
       htp.p(l_return);
    END;
    

    And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.

  • How to extract the values of XMLTYPE column,

    SQL > create table temporary global xmtype_tab (xmlfile xmltype);

    SQL > select * from all_directories;

    SYS RESTOREDIR/home / / dbimptask /.

    insert into xmtype_tab values (xmltype (dbms_xslprocessor.read2clob ('RESTOREDIR ','LAS_SETUP.xml ')));

    1 line of creation.

    SQL > select * from xmtype_tab;

    XMLFILE
    --------------------------------------------------------------------------------
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >


    How to extract the values inside each tag?


    XML file has the following data...


    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
    < > 9600 BAUD_RATE < / BAUD_RATE >
    < ACK_TIMEOUT > 1 < / ACK_TIMEOUT >
    < TUBE_TRAVEL_LIMIT > 4 < / TUBE_TRAVEL_LIMIT >
    < SEND_SID_TIMEOUT > 1 < / SEND_SID_TIMEOUT >
    < INDEX_Q_TIMEOUT > 2 < / INDEX_Q_TIMEOUT >
    < HW_HANDSHAKING > 1 < / HW_HANDSHAKING >
    < / ROW >
    < / LINES > ';

    I use the Oracle 10.2.0.3 version...

    Why does this work?

    You are missing the tag of the ROWSET:

    select extractvalue (xmlfile, '/ROWSET/ROW/BAUD_RATE') baud_rate
      from xmltype_tab
     where existsnode (xmlfile, '/ROWSET/ROW/BAUD_RATE') = 1;
    
  • How to capture the value of type column report

    It would be a great help that you might suggest the following

    (i) Java script that I wrote on the standard status column (in a tabular report) fails.
    This happens because of the standard status column, if I use the text field then called Javascript function and showing correct results.

    Now, here, I want to know how to capture the value of the column standard report, since javascript fails due to
    the column values of standard report unrecognized.

    Example:

    Columns of the report as a table:
    ```````````````````
    Standard report column: salary
    TextField report column: new treatment
    Report column standards: difference

    I've written the javascript on column New_salary function which returns the value of the salary column to calculate the difference.

    For this column of report types, the javascript function does not work, that is to say, it does not show the difference., since it is not read
    the value of the column Salary (which is the Standard type of report column)
    Once I have change the Salary column to text (display as saved state) javascript field works fine.

    All entries on how to capture the standard value of the column, so that I can access the value of the javascript function.

    Thanks in advance
    Vijay

    Hi Vijay - I had problems with the forum as well (and my workspace OTN so)!

    You have two questions, I think.

    First of all, that the old wage is not an input element, you can not get to it by referring to an ENTRY tag. you will need to change that to something like:

    var s1 = d[k-1].firstChild.nodeValue;
    

    This means that there is nothing else in the cell apart from the text - as in < td > < table > 123. If there is something else there that stops you getting the value using the above, you can go through these nested tags referring to objects further firstChild-

    var s1 = d[k-1].firstChild.firstChild.nodeValue;
    

    As I don't see your page, you need to check yourself to see firstChild how much you need. This example assumes that you had something like: < td > < b > 123 < /b > < table >

    Second, the values of s and s1 are strings. You must convert these numbers to be able to perform calculations. You have two javascript functions to do this: ('string') parseFloat and parseInt ('string'). One contains decimals, the other is not - but know that one is not very accurate (it can change "123.456' in ' 123.455999999995' or something similar - not very good! '").

    So, your calculation should be:

    var diff = parseInt(s) - parseInt(s1);
    

    Andy

  • How to replace the value of a column in a table based on the value in the second column?

    Hi, I would like to find in a table 2D for values that meet certain criteria (for example, a column< 0.98).=""  based="" on="" which="" rows="" meet="" this="" criteria,="" i="" want="" to="" replace="" the="" values="" in="" a="" different="" column="" of="" the="" array="" (change="" to="" 'nan'="" so="" that="" the="" values="" will="" not="" be="" included="" in="" any="" calculations="" on="" that="" column,="" for="" example="" the="" finding="" the="" mean).=""  i've="" attached="" a="" sample="" .csv="" file.=""  if="" the="" values="" in="" column="" 3="" (index="" 2)="" are="" less="" than="" 0.980="" (or="" some="" other="" user="" defined="" value),="" then="" the="" value="" in="" column="" 2="" (index="" 1)="" should="" be="" replaced="" with="" nan.=""  can="" someone="" help="" out="" with="" this="" search="" and="" replace="">

    Thank you

    Keith

    (using LV 2009 SP1)

    A few quick hits.

    You can merge the two for loops

    You have not need one of the constants 1 and 2 in the index table.  They will solve automatically when you expand on the index picture, once you have wired to 0 in the column index.

    It seems a lot of handling additional table spent unnecessarily.

    See below.  I did not try to duplicate your code to see how it actually works, but I believe that I have attached will give the same result with less steps.

  • HOW automatically update the values of the attributes in a VO?

    Hi, experts,

    In jdev12.1.3

    There are two attributes in the original Version, when the line is created or updated and sent, these attributes should be updated automatically:

    1 revise_date: the current datetime object is defined on it;

    2 revisor: employee name of the user who is a field in the page will be defined on it.

    I rewrote the code for RowImpl.java of the VO as java:

    public Date getReviseDate()

    {

    return ((Row.EFFDT_UPDATE_CHANGE_INSERT_MODE == this.getETask () .getEntityState ())

    || ((Row.STATUS_NEW == this.getETask () .getEntityState ())) ? (Date) Date.getCurrentDate ():

    GetAttributeInternal (REVISEDATE) (date);

    }

    But it did not work as I hope. What is wrong with him?

    In addition, in order to set the value of revisor, how do I bind values of a reference of a jsf in RowImpl.java of the VO page

    Thank you!

    Or you can update specific attributes in the method DO DML in your EO Impl class

    Oracle ADF and Jasper ireport tips: overview of the ADF OT and VO classes

    Ashish

  • How to pass the value of a column to a variable to be used in another analysis

    Hello

    I'm on OBIEE 11.1.1.7.1.

    I have the following problem.

    I have DISCOVERED called analysis. It has just a column with the result. Simple. Assume that the answer is 2500

    I have another scan which has two other columns, namely GOLD and LOANS. I want to calculate the total DISCOVERED + GOLD + READY.

    That's why I need to pass the value of 2500 of the first analysis of the second analysis via a variable.

    I can not add all three of them in the same analysis there are various filters for OVERDRAFT, and the application of these filters on the GOLD and LOANS gives the desired result. I tried to add filters in the column of the overdraft, but that doesn't seem to work.

    Any help will be greatly appreciated.

    I'll give you an example. I hope that you will mark for my time...

    Hope that you will be aware of how to combine a similar request.

    in the first criterion you have

    Goldprice Loanamount year 0

    Second criterion

    Year 0 0 Overdraftamount

    the two maintain the necessary filters.

    Add a column of result (option you can see in the topic area pane) that add all three columns. You can choose the columns. formula will come something like below

    saw_1 + saw_2 + saw_3

    Thank you

    AJ

  • How to send the values in a column of "report" instead of a "part of the Page?

    Hello

    Here's my case: two pages A and B.
    A page is used to display each employee of a selected service.
    Page B is used to create / modify employees.

    I create a button page which redirects to page B.
    By default, page B is empty (from course to fill in the blanks to create a new employee).

    However, there are 2 values I want to send to page B (I want to fill in some blanks in advance): the service and the Manager ID ID (there is a Department Manager).
    -I managed with the service ID because it is a page element and in the "Action when click on the button" button I filled "Set these Items"-> agenda of Page B "with the values"-> about a Page A day.
    -I am confused with the ID of eating because it is not a page element, but a report column and there is nothing to do like I did for the service in the button ID to create.

    I'm a bit lost cause I don't know how transfer/send this value to the second page.

    Do you have any idea?

    Thanks again for your time!

    BR

    Ulrich

    "Cleared Cache to Page 4, when an employee existing is being changed."

    Where did you get that? >

    On page 3, region staff, the report Employee ID attribute

    See Empty the Cache under the link column

    Glad to have helped.

    Jeff

  • How to display the value of a column as the title of a report?

    I have a table with two columns: a column has a date, another b column is varchar. Two columns values like this:
    A AND B
    12/03/2012 test1
    22/04/2010 test2
    09/08/2011 test3
    29/07/2011 test1
    01/12/2010 test3
    28/10/2010 test2

    I need to generate a report for A year and count b like this:
    CalendarYear test1 test2 test3 total
    2010-2011 count (test1) count (test2) count (test3) count (test1) + count (test2) + count (test3)
    2011-2012-count (test1) count (test2) count (test3)


    How to get there?
    Thank you.
    Jen

    Published by: Jen Hu on November 1, 2012 11:31

    SQL > select trunc (i, 'year'), count (*), sum (decode(j,'test1',1,0)) test1cnt, sum (decode(j,'test2',1,0)) test2cnt, sum (decode(j,'test3',1,0)) test3cnt
    2 of demo2
    3 Group of trunc (i, 'year');

    TRUNC (I,'Y COUNT (*) TEST1CNT TEST2CNT TEST3CNT)
    ---------- ---------- ---------- ---------- ----------
    01/01/2012 1 1 0 0
    01/01/2010 2 0 1 1
    2011-01-01 2 0 0 1

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • update the value of the column to the next value

    Hi all

    create table xxc_test (date of from_date, to_date date, amount, number incr_amount);

    Select 2014, 2015, 3000, the double null

    If suppose if input data in the incr_amount then let say 1000 I want to update the value with incr_amount column amount

    Select 2014, 2015, 4,000 of the double

    If not even though it is as

    Select 2014, 2015, 3000, the double null

    and must be updated to the year

    Note: I spend the year, amount,incr_amount manually (run-time)

    Post edited by: Rajesh123 Note added in the subect

    Hello

    : new.incr_amount: = 0; also use it in code.

    The condition " If : new.incr_amoun is > 0" then (sure fire or change the value only if the increment is positive. ).

    ,....

    ..

    end if;


    -Thank you

    Pavan Kumar N

  • How dynamically update the role of oracle using the trigger

    How dynamically update the role of oracle using the trigger:

    I have svmanger owner of schema in the database. There are five tables belonged to svmanager.

    Table A, B, C, D, E.

    I have a role that is played only to these tables under the scheme: SVMANAGER_READ_ONLY

    now, if I create a new table F under svmanager. the role that svmanager_read_only does not work is updated, so the user had assigned role cannot access table F.

    is there a way to create the trigger for this role dynamically update any when a table is created or deleted?

    Thank you.

    I really really really don't suggest to do this - it's a bad habit. If possible I'd just adding the grant as part of the steps to the role on the new creation of the table.
    But for fun here's how you can accomplish this:

    create or replace procedure execute_grant(v_ddl in varchar2)
    is
    begin
       execute immediate v_ddl;
    end;
    /
    
    create or replace trigger catch_create_table_trg after create on schema
    DECLARE
    
    ddl_job number;
    ddl_str varchar2(50);
    begin
       IF ora_dict_obj_type = 'TABLE' THEN
    
           ddl_str := 'GRANT SELECT ON '||ora_dict_obj_owner||'.'||ora_dict_obj_name||' TO SVMANAGER_READ_ONLY';
    
           dbms_job.submit(job => ddl_job,
           what => 'execute_grant(''' || ddl_str || ''');',
           next_date => sysdate+(5/24/60/60));
    
       END IF;
    end;
    /
    

    Test it

    create table F (id number(1));
    

    Validate

    select * from ROLE_TAB_PRIVS where ROLE = 'SVMANAGER_READ_ONLY';
    
  • How to update the model of RDS for Windows Server 2012 collection?

    Hi team,

    I want to know how to update the collection of RDS model (model master sysprep) which is used to create the collection?

    I tried the below way but did not get the update of the collection of virtual machines.

    -Start the image of mater of sysprep

    -install the required components

    -resysprep the image and stop it

    -East went to the RDS Collection and added new virtual machines in collection (removed the old his)

    Once created, I opened a session in the machines, but I don't see the updates (I installed some software in the sysprep image however and no is not there in the virtual machines in the pool)

    Can someone let me know if I need to create a whole collection again or the way I do it is a proper way? If it's a good way what could be the reason why I get the new installed software model sysprep image in virtual machines created in the pool, based on the model?

    How do we actually updated for security and other regular patches updated in virtual machines? In my view, we use the same approach?

    Any suggestions will be appreciated.

    Kind regards

    original title: Windows Server 2012 RDS - model Sysprep update process and collection of creation

    Hi MS Expert 2010,

     

     

    I wish that you post your question in the TechNet Forums as it is addressed to an audience of it professionals.

     

    Check out the link-

     

     

    TechNet Forums

     

    Hope this helps!

     

  • Update the value Table B if table A the value of different

    Hi all
    I'm using Toad for Oracle and need assistance with a trigger. I have two tables tables A and B Table with some of the same fields. I want to only update the values in the array B, if the values in table A are not equal values in table B table A update. Don't update the record where the primary key of the Table equal to the foreign key in the Table B. I have a sample script below, I hope someone can give me an example, I can develop and test. Thanks for reading also.
    CREATE OR REPLACE TRIGGER AU_Table_A
    AFTER UPDATE ON Table_A
    FOR EACH ROW
    BEGIN
    If Table A :old.value != Table A :new.value
       then 
       update 
    --Update Table B value with Table A updated value
       Table B :old.value = Table A :new.value 
    where Table A primary key = Table B foreign key
    ............
    END IF;
    END;
    Published by: Nikki on December 6, 2011 07:50

    Hi Nikki,

    If I understand correctly, then maybe

    create or replace trigger au_table_a
      after update
      on table_a
      for each row
      when (old.value != new.value)
    begin
      update table_b
      set    table_b.value = :new.value
      where  table_b.foreign_key = :new.primary_key
          and table_b.value != :new.value;
    end au_table_a;
    /
    

    Note that the solution is not trying to handle NULL values. If you have NULL in to either A or B, we have to manage those specifically

    Concerning
    Peter

Maybe you are looking for

  • DAQ traditional support in LabVIEW 2010?

    Hello Was this looking for some time and I have to admit, I'm quite confused. I'm trying to run a program written in LV 7.1 traditional use DAQ vi of the LV 2010. I think that what I need are traditional DAQ hardware drivers, but I can't find the rig

  • Error 0x8007054F codes & 0x66A

    Hi there, I tried to install 2 x unsuccessful security updates. They are 2393802 KN (error 0x8007054F code) and Ko 974417 (error 0x66A code). I tried Fix - it and the analysis of malware and security running, but still updates will not be installed.

  • When you try to reinstall Family Tree Maker version 9, I can't go past a required DLL file error message. LTKRN10N. DLL was not found.

    Family Tree Maker no longer supports this version, but I don't want to upgrade to a new complex program.  Do a search, I found a page of FTM, who explained that the program needs a set of files to display and manipulate images.  These files are suppo

  • Windows Live Mail, Mail.MSMessageStore, and SuperFetch

    I now have serious problems to make Windows Live Mail todrive at a reasonable speed, probably due to the size of this fileat first more more than half the RAM installed on thecomputer, where the compression of the WLM databasestop working; so beyond

  • Problem with laptop goes into hibernation in Vista mode

    Hi, I need help... my laptop goes into hubernation mode and I can't wake up he brightens... I already have whent command promt and do a scan (sfc/scannow) and I find my got error file and it worked (file: CBS) I have no idea what to do to fix! I need