How to insert a calculated field?

Hi all

My sincere apologies if this is a bad place for this post.

I have a table that takes two values dynamically calculate the third value and must insert into the database.
The purpose of this is based on this third value, I have a lot of reports to generate.

My table is:

col1 col2 col3
40 100% 40
15 32 4.69%
100% of 88 113,64

So basically, the third column is to generate dynamically using the first two fields (Col3 = (Col1 * 100) / Col2)

Can any body help me in writing a query for this kind of situation (in ORACLE APEX is appreciated or PL/SQL or oracle/SQL else is good too).

Thanks in advance.

Published by: user5564103 on January 13, 2010 22:40

Hello
If you have values for the first 2 columns of the third column filling should not be a problem at all.

Assuming that

tab_1 (x number, number y, z number) / * correct accurately * /.

Insert into tab_1 values (x,y,x*100/y);

For some reason you can't do this, you can

update tab_1 set z=x*100/y
where...

See you soon!
Bobin

Tags: Database

Similar Questions

  • How to insert a form field

    Gurus,
    in the form field method


    How can I insert a form field to denote the beginning of the group.

    In the enter text field help: (<? for each: G_VENDOR_NAME? >) == > > I would like to add this?

    I am not able to find this in MS word 2007?
    Please guide
    Thank you

    Hello
    If the answer to your question, please mark it replied.

  • processing the page and inserting the calculated field

    Hello

    I use Apex 4.2.5 and oracle 11g

    In my form page, I have the size of fields assigned and used. the third "freesize" field that has to calculate the other field1 allocatedsize two fields (ie) - usedsize field2.

    the third freesize of field must be filled in automatically after calculation. When I press button creation or changes button apply, it must be updated automatically in the folder.

    How to do?

    Thank you

    Hi KJChellam,

    I suggest that you look at this thread for more information.

    Search for: dynamic action to email of automatic calculation based on the fields firstname and lastname in the form created in APEX

    Kind regards

    Benjamin.

  • How to make a calculated field in the view object

    I use Jdeveloper 11 R2 (11.1.2.3)

    In some cases I need to calculate a field based on information from another object of usage view

    I came up with the idea of a transitional attribute for the first object view and try to initialize in the Get accessor method in RowImpl

    But I don't know how I can access another display object in the class RowImpl

    Any solution or suggestion?

    Appreciate your comments

    Concerning
    Mohsen

    Create an accessor from view in the t you want to access another VO.
    get the other VO by using the Get accessor of the accessor to view in a rowset obj.
    setnamedwhereclauseparams if necessary.
    ExecuteQuery and then iterate over the rs to get any desired attribute - note the attribute must be the attribute in the called t.

    Edited by: bigchill 06/03/2013 17:37

  • How to hide one calculated field if zero

    Hello.

    I am working on a form of column 5. I'm utilitzing the option product (X) to automatically calculate the price per unit quantity X

    Most of the time I'm only using a couple of lines.

    I want to keep the calcualations, but I don't want a ZERO to display when I print.

    Is this possible? I don't know javascript and anyone who can tell me how and possibly provide the solution, would be greatly appreciated.

    Thank you

    You can use the validation script custom following in the result field:

    If (event.value == 0) event.value = "";

    You will need to refresh, recalculate, or clear the form to get the code to be triggered.

  • How to filter records in a main query of RDF based on the values of the calculated fields

    Hello

    I'm working on a report of RDF, where I have my main request which has four fields.

    (1) the unique id for the field

    (2) numerical value 1

    (3) numeric value 2

    (4) numeric value 3

    I added a CF_Total of calculated field.

    The main query returns all the records, but I want to only show that these fields for which the CF_Total has a particular value.

    Can anyone help me about how to proceed.

    Concerning

    Hawker

    Hello Hawker,

    This is an example, how you can filter based on the formula column. I don't know exactly where you would use. And other related issues.

    Give the idea and example how you can start.

    Thank you

    Hamid

  • How can I get rid of zero in a calculated field when the form is empty?

    I made a form that prompts the user to enter data for specific years.  At the top of the form, the user places in the current year, i.e. 2000.  Column copy this year here, the second column adds five years and the third column adds 10 years.  I managed to create a simple script for each of these columns (so that when 2000 came; columns a, b, and c appear as 2000, 2005 and 2010) but when the form is empty a zero appears in the first cell, a 5 appears in the second cell and a 10 appears in the third cell.  I want the completely empty form so as to not confuse the person when they begin to enter data.  How can I write a custom script to eliminate the numbers in calculated fields?

    I would use a script for calculating customized for each of these fields. Something like:

    Calculation for reference year script

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? v : "";

    })();

    Calculation script for field goal 5 years

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? +v + 5 : "";

    })();

    Calculation script for the 10-year target field

    (function () {}

    Get the value of the WCPYear field

    var v = getField("WPCYear").valueAsString;

    Set the value of this field. The value empty if WCPYear is empty

    Event.Value = v? + v + 10 : « » ;

    })();

  • How to insert a calendar in a field?

    Hello

    How to insert a calendar like that? It is the arrow button.

    Capture.PNG

    I notice that there are some third-party plug-in, but y at - it a brand that she linked to the 'calendar system' as indicated above.

    Thank you

    This is only possible if the file has been created using Adobe LiveCycle Designer. This feature is not available in Adobe Acrobat format.

  • How can I create a PDF form that contains data fields and calculated fields?

    Hello, I need to create PDF forms that has

    -Fields that are read from a MS SQL Server database, once the user enters a field other fields must be read from an underlying database

    -Calculated fields

    what PDF forms product supports this? Once this file created is also filling end-user which form has any kind of special licenses, otherwise he will be able to fill this with Adobe Reader?

    You need to expand the PDF form using Adobe LiveCycle Designer if you want to be able to connect to a database.

    And Yes, it should be possible to use the file in Adobe Reader after that.

    For more questions on LCD forms are trying this forum: LiveCycle Designer

  • How to keep the form fields empty with calculated fields

    I am to convert Excel files to Adobe forms with calculated fields.  I use the following if statement to keep the empty fields until the entry is made.

    var v1 = + getField("LengthRisersToday.1").value;

    var v2 = + getField("LengthRisersToDate.0").value;

    If (v1! == 0) {}

    var sum = v1 + v2;

    Event.Value = sum;

    } else {event.value = ";}}

    This does not work if someone from 0 in the field "today."  This is sometimes necessary in this form, as the other fields must be filled and a riser is not always added.

    This form consists of several lines and inscriptions are made there is a running total in column "on this day".



    So you say that a result no one is valid and that you want to delete a result of zero only if the LengthRisersToday field is empty? If so, the script can be replaced by:

    var s1 = getField("LengthRisersToday.1").valueAsString;

    var v2 = + getField("LengthRisersToDate.0").value;

    If {(s1)

    var sum = s1 + v2;

    Event.Value = sum;

    } else {}

    Event.Value = "";

    }

  • How can I validate that a calculated field is equal to a specific number?

    Thanks in advance for your comments and advice. I have a calculated field that adds the sum of the two percentages (for example 25% and 50%). I want to validate these percentages is equal to 100%. Thanks, any help would be appreciated.

    You can use sometthing that personalized the calculation script:

    If {((+event.value)! = 0)}

    If {((+event.value)! = 100)}

    App.Alert ("the sum of the percentages must match 100 %.");

    }

    }

  • How to insert a block of digital signatures for the form fillable

    Just upgraded to Adobe Acrobat DC. How to insert a block of digital signatures for the form to fill out?

    Tools > prepare the form

    Insert a signature field

  • Calculations on calculated fields BAM 11 g

    Hello

    We have the following problem. We have created the following data object to follow our process:

    ProcessID StepName Duration   

    1. validate 10

    1 process 50

    1 SaveInDB 100

    2 validate 20

    2 process 30

    2 SaveInDB 110

    3. validate 15

    3 process 45

    3 SaveInDB 85

    We are able to create dashboards that show how to take each process by adding the duration (AMOUNT (DURATION) Group BY ProcessID. But we cannot create dashboards that show the average length of a process, the fastest or the slowest process. Something like AVG (SUM (DURATION) Group BY ProcessID). Is it possible to create calculated fields that summarize other calculated fields?

    Best regards, Nicolas

    After you open an SR with Oracle it is not possible to do what we expected. We have defined a new data object that stores the length of the entire process as a solution, and then we can use it to get the AVG, MAX, and Min the process duration and not only its not.

  • How to insert a BLOB column to a schema to another schema using proc of PL/SQL.

    Hello

    I want to know is there a simpler method to insert data of BLOB column in a table would like to insert into another table that is in a different schema.

    Table: TARGET (col1 number, varchar2 (100) col2, col3 BLOB) (SCHEME A)

    Table: SOURCE (col1 number, col2 varchar2 (100), col3 BLOB) (SCHEME B)

    I tried with the logic of following insertion.

    INSERT INTO < TAB2 > AS SELECT * FROM < TAB1 >;

    But the inset above has not copied the BLOB data, which are shwoing empty blob in the column in the target.

    Concerning

    Suresh

    Ask Tom how to reproduce one BLOB field to another

  • Trigger a calculated field to display the different fields

    I have a calculated field (rate) that is used to calculate a total value if the quantity field is exceeding a certain amount would then display one of the 2 hidden fields, but I don't know how to trigger the amount field code

    Here are a few examples. They would go in the event your amount field calculate

    Say there is a threshold of $5,000 for the field to be visible.

    if (this.rawValue > 5000) field1.presence = "visible";
    else field1.presence = "hidden"; //to rehide if the amount drops below your threshold.
    

    If there is a second threshold for the another hidden field like $2,000 for Field1 and 5,000 for the Field2.

    if (this.rawValue > 5000) field1.presence = field2.presence = "visible";
    else if (this.rawValue > 2000) {
      field1.presence = "visible";
      field2.presence = "hidden";
    }
    else field1.presence = field2.presence = "hidden";
    

Maybe you are looking for