How to truncate a decimal number to 2 places of a sum field

Hello world

Hope all is well,

When you export the query to Excel, a cumulative grade point average with 2 decimal digits is list in Excel with 9 digits after the decimal point.

Wanted to truncate the decimal to 2 positions in the disco.

fit: TRUNC (SUM (Global Lgpa Gpa), 2) beak query uses the sum field

the sum field shows:.89 and the calc above montre.88

I tried to put ROUNDS around the above as this ROUND (TRUNC(SUM...))
and got a data type error...

Your ideas and your advice would be appreciated, tx... sandra

Hi, Sandra
Seems good. You may need to format the resulting in Discoverer column, if as it sometimes fails by default for the number of spaces defined by rounding and truncation.

Best wishes
Michael

Tags: Business Intelligence

Similar Questions

  • How to convert a decimal number to this day?

    select to_date('09:40:00','hh24:mi:ss')  - to_date('08:15:00','hh24:mi:ss') from dual;
    This code generates this number:.059027778
    I want this number to represent the difference between the two time in hours and minutes

    urgent please

    Thank you

    There is nothing urgent in this forum...

    select numtodsinterval (to_date('09:40:00','hh24:mi:ss')  - to_date('08:15:00','hh24:mi:ss'), 'day') from dual;
    
  • How to add a sequential number or random as a merger of field?

    I created a landing page of confirmation which must be sent to an external site for tracking purposes. As one of the URL attributes, I need to assign a unique ID for the transaction, but the problem is that I can't use the email address.

    So my thought was that I created a random number and use it as id I checked the Math App in the cloud connectors, but realized that this only works in the campaign workflow. Then I thought so maybe some PHP in the destination page would help, but that is not taken care of.

    Any ideas on what I can do to fix this problem? A sequential number would be great but not necessary, so I figure that if it's long enough so a random number should not be repeated and will be able to work for my needs.

    Thank you

    Fernando

    I see two options:

    (1) you might actually be able to use the Math cloud connector in this case. To do this, start by creating a new field in the contact table to hold the random numbers, then set this field as a merge field (assets > creating a new Email > merge field > New). Now, you just need to run the Math Cloud Connector step in your Web of campaign, do fill this field of database for you and don't forget to add the merge field at the end of your URL as a query string.

    (2) the simplest option is to use the Eloqua user as a fusion variable id. If the Eloqua user ID is not yet an option of merger on your instance, simply follow the steps to set up a merge field (assets > creating a new Email > merge field > New) and choose the Eloqua user ID, now add at the end of your URL. It works even better that which precedes because area you guaranteed to have a unique value per user. If you need a unique value per visit, then I think that freejungof response would work very well, especially if you concatenate the JavaScript random number with the user id.

  • How can I limit the number of rows in a text input field?

    I don't want to have it scrolling. For example If the field has four lines the user is writing the fourth lineand give such ENTER or continue type up to are no longer on this line, I don't want to create in the fifth line text field. Il a do?

    An approach here is to limit the number of lines, someone else might have a different approach... "tf" is the name of the instance of the textfield object.

    tf.addEventListener (Event.CHANGE, checkNumLines);

    function checkNumLines(evt:Event):void {}
    If (TF.numLines > 4) {/ / deletion of the last typed character}
    TF. Text = String (tf.text).slice(0,tf.length-1);
    }
    }

  • How to test if the rest is a decimal number or an integer?

    Hi guys!

    I want to check whether or not my rest of two integers is a decimal number. Also, if it is a decimal number, I wana it allows to do a thing and if its an integer, I want her to do something else. How can I do?

    Help, please!

    Thanks in advance.

    Craster.D wrote:

    The task is to divide two numbers X and Y and a LED lights up if the result/rest is a decimal number. It can be higher or lower than 1, is not serious. If it is not a whole number, the LED should light.

    Great looks that you know exactly what you want to do, which seems to be the problem?  You will find the functions you need in the digital, boolean and comparison scheme.

  • generate the signal of decimal number

    Hello

    I have a program that calculate the heart rate from the ECG signal. I want to show the beats per minute on a graph with 60 s of the plot of the story.

    Since the vi who calculate the heartbeat I get output the string with the number, only when the wave of the tip, then I convert it to a number and then I place the offset of a simulated DC signal.

    (In the table below the beats per minute are always 60 because I'm simulating a sinusoidal signal with 1 Hz).

    ------>

    It works fine, but I'd like to see not the summits but a continuous line from one point to another, such as interpolation.

    in this case, it would have been a horizontal line to 60 BPM.

    I thought to store the last value of the chain and keep it frozen until the next update of value.

    Do you have suggestions on how to do it?

    Concerning

    Not clear what you get in the form of numbers, seems that you get too many zeros, and you get a decimal number or another 'dynamic '? value?

    You pulse-rate information could be ~ 45 to > 180 values per minute!

    You display the exact story of a minute?  Maybe (keep the last ~ 300 values with timestamps and use an XY diagram) a graphic story can be configured to display

    wait... Here's one way:

    I fed a chart (with 256 points in history), with a waveform. the wfrm has only a single value in the array of values and a t0. The chart is configured to display the 60 sec.  Seems to work

    My simulation will display a min rate of ~ 45 BPM, but you can beat him

  • Convert a decimal number to a string

    I work with a gas mixer and I try to transmit data rates. The mixer takes only decimal values, for example, if you want to 2500 cc debit you must pass it 2500.0. I tried to use the function of decimal string number and do a type cast but I get an error every time machine. The only thing that works is by using a control of the chain and entering the value, but I would like to do it with a digital command. Someone at - it tips or advice?

    Note that you have provided only a sample size. In addition, 2500.0 isn't a decimal number, it is a floating point value.

    It is also not clear if how you talk to the machine. You said that you used a Type Cast. For what? How do you communicate with the machine?

  • Result of the calculation were separated to the whole and decimal, number not rounding correctly

    I have 2 fields as a result of sharing: the whole and decimal number (1 decimal place). I Math.floor the result to get the whole number and everything is fine until I hit a case where the result is 92,97.

    This should give "93" in the whole of the field and '0' in the decimal field, instead it gives me '92' and '10' (even though I'm only hosting 1 character in the field).

    How can I get the '93' and '0' in the following code?

    fieldLVEDV = this.getField("LVEDV").value;

    fieldBSA = this.getField("BSA").value;

    If (fieldLVEDV! = "" & & fieldBSA! = "") {}

    totalLVEDV = this.getField("LVEDV").value + ((this.getField("LVEDVDec").value)/10);

    calculation = (totalLVEDV / fieldBSA);

    calculationDecimal = calculation;

    partWhole = Math.floor (calculation);

    if(partWhole <0) {partWhole =' ' ;}}

    this.getField("Index").value = partWhole;

    this.getField("IndexDecimal").value = Math.round (10 *(calculationDecimal-partWhole));

    {If (this.getField("IndexDecimal").value = '10')

    {

    this.getField("Index").value = partWhole + 1;

    this.getField("IndexDecimal").value = "0".

    }}

    } else {}

    this.getField("Index").value = "";

    this.getField("IndexDecimal").value = "";

    }

    I thought I'd add the blue part would do the job, but obviously it did not work.

    Ah, your problem is that you do not use the correct comparison operator. To check if two values are equal, the operator is "==" not not "=". Using "=", you assign the value 10 to the field which you then pass in 0 a few lines down. Use 'is' and things should work correctly.

  • How to truncate sysdate

    Hello friends

    I created a table called newspaper as follows

    create table log (number, login_date date logid);
    Insert in the journal values(101,sysdate);

    After 10 minutes, I created a slider as follows...

    declare
    uname varchar2 (30);
    logdate date;
    cursor name_c is
    Select logid, login_date in the newspaper where logid = 101 and login_date = sysdate;
    Start
    Open name_c;
    extract name_c in uname, logdate;
    if(name_c%found) then
    dbms_output.put_line ('FOUND');
    end if;
    close name_c;
    end;
    /

    Set serveroutput on;
    PL/SQL procedure successfully completed.



    But I did get no results... I found the reason that when I insert in the sysdate table stores all fields
    including hour, min, sec, etc... But I extract sysdate cursor [after 10 min] right now the fields change. Then only the cursor don't fetch no line... Please, help me to extraction of the row in the table of the newspaper...
    How to truncate field sysdate to extract only date like('18-feb-2011')...

    Change the cursor like query

    cursor name_c is
    select logid,login_date from log where logid=101 and trunc(login_date)=trunc(sysdate);
    

    Edited by: Oracler February 17, 2011 22:48

    Edited by: Oracler February 17, 2011 22:48

  • How can I determine the number of contacts that I have

    How can I determine the number of contacts that I currently have on my iphone

    I don't know of a way on the iPhone, but if you have a Mac, you can go to the Contacts (platform) app and scroll to the bottom where you will find the total.

    Same for iCloud.com on your browser, go to the app, scroll down.

  • How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?

    See if this application works for you > https://itunes.apple.com/us/app/image-size/id670766542?mt=8

  • How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    As far as I KNOW, the serial number of the MacBook does not have the serial number of the processor.

  • I have an iPhone 6 and use Verizon as my server. How can I increase the number of rings until it goes to voicemail?

    I have an iPhone 6 and use Verizon as my server. How can I increase the number of rings until it go to voicemail?

    You can not. There is no adjustment to make on a phone. In fact, it is not based on the number of rings, it is a problem of synchronization based on the parameters of the call. You can contact Verizon to see if they can increase at that time here, but even if they can, it won't be much, only a few seconds if they do at all.

  • How can I block unknown number or call number Caller ID?

    How can I block unknown number or call number Caller ID? A madman who got hold of my number and do not stop calling me. It is ruining my business that I only work with a mobile phone number. I get unknown calls 400 per day and none causing business that my phone is busy all the time. Samsung has this feature, but I refuse to believe that Apple isn't a solution for this problem.

    Asking again not you will get a different answer.

    You can not. your carrier may offer blocking of anonymous calls. Contact with them.

    Better yet, contact the police. This is harassment. They can trace the source of the calls. If they are from one person, it is a criminal offence.

  • How can I block my number before you make a call

    How can I block my number before you make a call? Thank you!

    Settings > phone > display my number: OFF

Maybe you are looking for