HOW DO I PUT FINANCIAL CALCULATIONS IN COLUMNS AT DEVELOPMENT STAGE?

Hi Colleagues,
I am trying to programme a financial database with Oracle Apex 11g 2.0. My focus is to put in formulas that would automatically calculate the returns of number of columns added, subtracted, divided or multiplied together in specified columns (e.g. Column A + Column B = Column C) apart from using SQL UPDATE statements. I used the UPDATE command:-
UPDATE EMPLOYEES calc
SET
GROSS_SALARY =(BASIC_SALARY + ALLOWANCES),
NET_SALARY =(GROSS_SALARY - DEDUCTIONS);
What appears is that each time I make new entries leaving the Gross Salary and Net Salary columns blank, I had to copy and paste the syntax into the SQL COMMAND window and run before the columns are updated
Now, assume a bank Teller at the counter is paying cheques and receiving deposits how can he always be copying, pasting and running sql updates on every customer's transaction? Is there any script that can be used at the development stage so that when the end-user makes initial entries the calculated columns display the results?
My second problem is that; how can I print from the Report or the Form page in the database?
Counting on your assistance
Godis-Tei

Godis-Tei wrote:
<snip>
As I said earlier on, I am very new in learning database development.
</snip>I stopped reading here. No offense meant, but if you are new in database development, you should ask rather than tell. It is very bad design to store anything that can be calculated - that is what a database view is for. Financial calculations are rarely if ever anything ad-hoc that need to be done on the fly - they are based on known columns and known formulas.
My second piece of advice is that you need to stop basing things on what MS Access does. MS Access is a toy aimed at non-developers to make it easy. Oracle has had the #1 relational database pretty much forever, so they don't really need to support anything like you're describing. I don't know what competitive market or world you're talking about, but Oracle is generally not compared to MS Access very often. That would be like comparing a Ferrari to a VW Jetta - they are both cars and have 4 wheels, but the comparisons stop right there.
Thirdly my last piece of advice would be to use OTN as a learning resource. Keep in mind that just because you did something one way in one software suite, it doesn't mean it is a best practice in another. Take locking for example - if you are coming from certain databases, an update to a row will block others from selecting that same data. Oracle works completely differently, so you need to learn how Oracle works, and stop expecting it to work the same as others.
Hope you take my advice!

Similar Messages

  • How can i put image in table column

    Hii
    I have to make one application in which i m going through JTable but look shoud not be like that ....border of row and column should be invisiable and in the last column Image should be displayed....... i m unable to find this..
    can anybody help me ...
    Vaibhav Gupta

    Both of these question have been answered recently, like in the last 30 minutes. Check out other threads for you answers.
    Cheers
    DB

  • How to perform calculations using column data in BI Publisher

    Hello guys
    I am very new to BIP, and recently I am learning to create new templates using XML files..
    I am trying to create a report that has Account Amount, Amount Net Amount, PM_Amount and a New field say "X"
    For Account Amount it is what it is, but for Net Amount it is "Account Amount/40%", for PM_Amount it is "Net Amount x (Account Amount/30)" and for field X it is "(Net Amount + PM_Amount)/column A" where column A is another data field in the XML file but it should not be included in the template report..
    Could anyone help me with how to perform such kind of calculations in BIP Template builder? In OBIEE, it is very easy that I can just use column formula, but in BIP I still haven't figure out the way yet..
    PLease advice
    Thanks

    Thanks for the reply..
    I looked at the link you provided already, what I wanna know is how to exactly apply the expression in my calculation. In other words, I know that Column C = "Column A div Column B", but in BIP form property, how do I actually substitue "column A" with the actual column..
    I wish I could post the XML, but it is huge, it contains 6 data sets and more than 100 columns. I only need 15 columns on my template.
    On the form property of each measures, in the "advance tab", I see codes like <?accountamount?>. Now I wanna have a new column said "PM_Amt" which should be "(accountamount div %40) x column B". So I just randomly select another column said "payment". I rename it to "PM_AMT" and on its "advanced tab" it is still <?payment?>. So right there, if I wanna replace that code with a new one that does "(accountamount div %40) x column B" calculation, how would I do it? What would be the syntax including how to propertly refer to the right column field as part of the expression?
    And do I have to always use xdofx between <>? how would I know?
    Please advice if you understood what I am trying to say
    Much thanks
    Edited by: user7276913 on Sep 14, 2009 11:24 PM

  • How to display a percentage sign in calculated member column?

    Hello all,
    in my report I have a calculated member column whose value is determined by follwing value formula:
      if CurrentColumnIndex - 2 = 1 then 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex)) * 100 
        else 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex))*100 
    Returned is a numeric value and it is being correctly displayed in calculated member column. As the value should represent percentage, I need to display a % sign after every value.
    How would I achieve this? I have seen a thread here in the discussion where approach with a formula and DisplayString function is mentioned - but there are no details how this could be achieved....
    The crosstab in question looks like this:
    Calculated Member is based on "REV_TOTAL" group column.
    I also attached the .rpt file (renamed to .txt for upload)
    Many thanks in advance,
    Marin

    Hello Raghavendra,
    thanks for the quick reply.
    Unfortunately it is not as easy at it seems - calculated member column is not showing in report designer and I can not apply the suggested approach with formatting toolbar...
    The column only shows here (right click on table ->  "Advanced Calculations" -> "Calculated Member...") and there is no possibility to format it directly:
    Any other suggestions?
    Many thanks,
    Marin

  • I´ve made four Columns with text and an Image over the middle of two columns. How do I put a text u

    I´ve made four Columns with text and an Image over the middle of two columns. How do I put a text under the Image that spans over the Columns?

    Did you mean that?
    or
    Did you mean that?
    Let me know.

  • How do you put calculator on dock

    How do you put calculator on dock so it's there all the time?

    Care to share which OS you are using?
    Calculator has always been pre-installed in my Dock ever since Apple invented the Dock.  The original calculator app is inside the Application folder.  Drag the original app to the Dock.  The original app will move back to the App folder & a duplicate calculator app will be sitting in your Dock.

  • How to conditionally put a percentage sign in a column in a report

    Background: In the past, our users have been provided with a spreadsheet of statistics that was created manually, by running a bunch of barely related queries, manually entering the data into the spreadsheet, adding formatting and headings, etc. They wanted this moved to APEX, and they wanted to be able to export it as one spreadsheet. The only way I could find to do this was to combine all the queries into one huge query.
    So I have a report of 22 unique queries unioned together. The third and fifth columns are percentages. I found Column format with percent ( % ) sign post that explained how to use the HTML Expression (under Column Attributes) to add a percentage sign (#COL03#%).
    This worked fine except for that in order to get the headings how they wanted them, I had to do something like:
    -statistical query-
    union all
    select '<b>HEADING ONE</b>', null, null, null, null from dual
    union all
    -statistical query-
    etc.
    The problem now is that I don't actually want the percentage sign in the heading rows. Is there a way to change the HTML Expression so it's conditional, and it only appends the percentage sign if the value in that row is not null? Or alternately, is there a way to append the percentage sign in the actual select statement, so I could go through each of my 22 queries and append it only when I know it's needed? A simple example of one of these queries is:
    select ''New Enrollees'' as a,
    (count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END)) as monthly,
    (((count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_MON_SUBMISSIONS)*100) as m,
    (count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END)) as YTD,
    (((count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_SUBMISSIONS)*100) as y
    from main
    where extract(year from rdate) = :P45_YEAR_SELECT
    Thanks in advance for your help!
    -Gaso
    Edited by: gaso on Feb 4, 2009 1:39 PM
    Edited by: gaso on Feb 9, 2009 4:39 AM

    why don't you add the percentage sign in the query itself, e.g. with a case statement to show it conditionally?

  • SQL*Loader - How to combine Flat File 3 columns and put into one single column

    Receive a flat file delimited by comma. Want to combine Flat File last 3 columns and put into one single column(Table).
    e.g.
    Flat File
    100,239,30,20,30
    While inserting into table want to combine last 3 columns and insert into invoice number column.
    302030

    It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
    Vijay

  • Lost calculator when I push center mouse button how do I put it back

    I closed the calculator when it displayed using my center mouse button.  The only thing that displays is Date, Weather, Time
    I find on AppleHD the calculator and the Dashboard but I cannot drag & drob the calculator on Dashbard.  Anyone know
    how I can restore the calculator.  I have a Mighty Mouse with a small center button   thanks

    You can find more here http://www.apple.com/downloads/dashboard/
    Or do a search here http://www.macupdate.com/
    Enjoy!

  • How do I put a permanent dollar value in a numeric field?

    I'm setting up a simple order form in Adobe Livecycle Designer with UnitPrice, Qty and Total columns.
    I need to have permanent dollar values show in the UnitPrice numeric field. When they enter a qty, it will be calculated by the unitprice and give a total. I have already figured out the other calculations, just can't work out how to put the dollar values in the unitprice field. They must be showing when the person opens the pdf file. Can someone pls help, I have looked thru all the posts and couldn't find an answer.
    thanks in advance
    KerryDun

    I need the numeric field to show the actual price eg $3.50 and it needs to stay there, it's not editable. To get around this I have put a text field column next to the unitprice column, to show this value, but the filler will have to type the unitprice in again, in the unitprice column so it will make the calculation of unitprice x qty = total(when the price is already sitting there.)There must be a better way to do this. Any help is greatly appreciated.
    thanks
    KerryDun

  • How to get txt output in a column?

    Don't know and can't find anywhere, how to get output in a column in a dynamic textfield
    instead of getting the output i.e.
    output1, output2, output3, etc
    I would like to have it as
    output1
    output2
    output3
    but I don't know how to make returns in flash - in php /n
    can anyone answer my 'simple' question
    Thanx

    I solved it like this and it's working, but it seems silly, because I have 10 dynamic fields like this - I have tried /n to get all the outcome into 1 dynamicfield called total_txt but where and how do I put in /n?
            total_txt.text = Number(qty1_txt.text)+ " X " + "art 1"
            aAmount_txt.text = Number(qty1_txt.text)+ " X " + "art 1"
            bAmount_txt.text = Number(qty2_txt.text)+ " X " + "art 2"
            cAmount_txt.text = Number(qty3_txt.text)+ " X " + "art 3"
            dAmount_txt.text = Number(qty4_txt.text)+ " X " + "art4"
            eAmount_txt.text = Number(qty5_txt.text)+ " X " + "art5"
            aprice_txt.text =  Number(price1_txt.text) + ",- " +"  Euro's"
            bprice_txt.text =  Number(price2_txt.text) + ",- " +"  Euro's"
            cprice_txt.text =  Number(price3_txt.text) + ",- " +"  Euro's"
            kprice_txt.text =  Number(price4_txt.text) + ",- " +"  Euro's"
            eprice_txt.text =  Number(price5_txt.text) + ",- " +"  Euro's"

  • Can't figure out how to do a specific calculation

    I have a report that is broken into columns in the detail section.  From the data in that section I need to create a formula that looks something like the following:
    (column A - Column B)/column A
    Now because I have it formatted with multiple columns each column heading is the same field just pulling in different years.
    So even though Column A is 2011 and Column B is 2010 the field is still "TaxYear" for both columns.
    How can I make this calculation happen and populate in another area of the data?  Now the tax year won't always be 2010 or 2011.  But the columns will always be there.
    I hope I am making sense and that someone can help me.
    Thank you in advance,
    Erin

    I suppose so but I won't see it until about 10 am eastern standard time. click on my name to get address to send it to.
    You should know that SAP frowns using this method of solving problems though. Would be better if you post here so all can see.
    Be sure to include info of field names and formulas used.
    Edited by: DebiHerbert on Dec 7, 2010 12:38 AM

  • How do I change the order of columns in the responses table?

    How do i change the order of columns in the responses table in FormsCentral?  The default setting puts them in reverse order!

    Hi,
    The issue with the default ordering of columns in the response table is something that we hope to address in the next update to FormsCentral. In the meantime, you can reorder the columns by selecting them then click/drag using the gray area above the column name. As shown below, an orange marker will show you where the columns will be placed when you release the mouse button.
    Sorry for the inconvenience.
    Regards,
    Brian

  • How do I put strings, which I get during runtime, in a Ring-item? And how to open a Frontpanel of a SubVI by pushing a Button in the MainVI during runtime?

    I'm very new to LabVIEW and every day I learn such a lot about LabVIEW. I did not find any example according to my problem, but I don't know how to do the following :
    In the MainVI I read different strings from file in an array (In the example below I defined them as constants. The example only shows how the frontpanels should look like).
    During a loop I calculate different values, which will be written in an array, too, and in every loop the array of values will be overwritten with the new calculated values. (string[i] belongs to value[i])
    Now, by pushing the button 'sub' during runtime, I want to op
    en the Frontpanel of a SubVI, on which you see a Ring and a numeric Indicator. Now, I want to show the strings I read in the MainVI as items in the Ring-menu. If I choose one of the items (strings) in the Ring-menu during runtime, I want to show the accordant value, which was calculated in the MainVI, in the numeric Indicator, and in every loop the new calculated value should be shown in this Indicator automatically.
    So I have two questions:
    1. How do I put the strings into the Ring-menu during runtime?
    2. How to open a SubVI-Frontpanel during runtime, and how to pass the calculated values to it?
    Every answer I accept with thanks!
    Attachments:
    main.vi ‏29 KB
    sub.vi ‏9 KB

    See the atttached vis :
    1/ Pass the string array to the sub-vi, then use a property node to replace the ring node strings
    2a/ From the subvi front panel window, rightclick on the icon, and select "Show connector". Define the connections
    2b/Set the sub vi properties (right click on the vi icon, select "VI properties... >> Window appearance..." go to "customize...", and checkmark the "Show front panel when called" item).
    3/ your main vi should run 2 separate loops in order to avoid that reading the data stops the aquisition process (if any !..), or the reverse situation.
    You should read the LV manual to find out how to create a sub-vi : there are a number a basic things to learn and to memorize...
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    main.vi.zip ‏16 KB

  • How to use "put" function in Java.util.Map class

    intially an entry for key is null in a Map.
    then if I try to do put function on the map with the same key which had a null value previously It doesn't allow me to put the new value for the Key.
    Can anyone pleasee suggest as to how I can put a value on to key with the new value even if the old value is null.
    Waiting for replies

    I have problem with the "value"..Not with a "key"
    parameter in the function.I already have a value for
    Key...that is "Firstkey"
    Map map = new HashMap();
    String column = "FirstKey";
    map.put(column, null);
    The below step gives me an IllegalArgumentException
    map.put(column, "FirstValue");That's not the problem. Your error is somewhere else.
    This works.
    public class Test {
         public static void main(String[] args) {
              Map map = new HashMap();
              String column = "FirstKey";
              map.put(column, null);
              map.put(column, "FirstValue");
              System.out.println("Done");
    }Kaj

Maybe you are looking for