a rounding value

Hi all, I would like to round a value in the Sub function... but the o/p is a little different when I'm trying to round up cant someone suggest me what is the problem?
declare 
v_number VARCHAR2(100); 
begin 
v_number:=XXC_LANDED_COST_sandy('NOV612'); 
--vnumber1:=mode(v_number,4); 
  dbms_output.put_line('p_land_cost:'|| round(v_number,1)); 
END;

SQL> /
p_land_cost1:1.96286675243338120312749321844582734961
p_land_cost:.1
I don't understand why I'm getting 2values
Thanks in advance!

Oh, and why did you said v_number as a varchar2? It's probably a number? Especially if you are wanting to round up...

SQL> set serverout on
SQL> ed
Wrote file afiedt.buf

  1  declare
  2    v_number NUMBER;
  3  begin
  4    v_number:=1.96286675243338120312749321844582734961;
  5    dbms_output.put_line('p_land_cost:'|| round(v_number,1));
  6* END;
SQL> /
p_land_cost:2

PL/SQL procedure successfully completed.

SQL>

Tags: Database

Similar Questions

  • rounded values in chart

    I have a multiplot xy graph with as input a range of x values and the values y of 5.8 to 6 which are doubles.

    However, once the graphic display all values there are rounded to 6.

    I guess it must be a matter of setting somewhere that the values in the chart are not integers, but I can't find it there.

    I have already changed in the graphics settings-> format and precision-> digits of precision for 8, but I still get rounded up to 6?

    Where is the magical setting for this?

    Figure autoadjusts for the type of data connected directly on it. If connect you to a local variable, you do not get this feature for good reasons.

    Most likely, you had a whole one wired to Terminal curve at some point in the past and LabVIEW who remembered.

    The first choice should always be connect directly to the Terminal. Do not think that local variables and the 'variables' in the code of the text, they are not and should not be used as such. Local variables break the flow of data, can cause race conditions, complicate debugging and force copies of additional data in memory (can be very expensive for xy charts!), so there is a big difference. Local variables should be used if there is a very good reason.

    (See also this link and many other similar discussions)

  • The rounding value

    How can I round the double value of a not given numbers fraction, Say for example: my double is 10.222222222 for this issue, I want only 10.22 and 10.899999 for that 10.90

    How can I do this task?

    I wrote getDoubleValue (double) method that rounds the fractional pats

    public static double getDoubleValue (double value) {}
    Dim str As String = String.valueOf (value);
    int index = str.indexOf ('.) ', 0) + 1 ;
    String integer = str.substring (0, index-1);
    Decimals of string = str.substring (index);
    If (decimal.length)< 4)="">
    Returns the value;
    }
    isPre boolean = true;
    int i;
    for (I = decimal.length () - 1; i > 3; i-) {}
    Val As Char = decimal.charAt (i);
    If (val > = '5' & val)<= '9')="">
    isPre = true;
    } else {}
    If (isPre & val == '4') {}
    isPre = true;
    } else {}
    isPre = false;
    }
    }
    }
    decimal = decimal.substring (0, i);
    If {(isPre)
    int val is (Integer.parseInt (decimal) + 1);.
    {if(Val>=1000)}
    Integer = String.valueOf (Integer.parseInt (Integer) + 1);
    decimal = '0 '.
    } else {}
    decimal = String.valueOf (Integer.parseInt (decimal) + 1);
    }
               
    }
    return Double.parseDouble (integer + "." + comma);
    }

  • Rounded values of AE setValueAtTime script?

    Hi guys,.

    I'm just getting started with extendScript, and I ran a question.

    I'm trying to set a keyframe to a value (admittedly) large, After Effects sets a value that is different from the value that I. It seems to be snapping more rounded and incoherently.

    For example, the values I put in the script, and what After Effects is layer on keyframe

    1248304.6823 1248304.625

    -4720535.9958 - 4720536

    4092748.7335 4092748.75

    You can see it seems to be 'registration' values in de.025 increments, but it does so inconsistently with a value to another. Is there a setting that I can put in the script to force it to use the actual value I want?

    What is strange is that if I copy and paste these values into After Effects directly on keyframes, it rounds up to 3 significant figures, as I expect.

    Is it all just because my numbers are too big? And if so, why the After Effects has no problem with the values?

    Ideas or ideas would be very appreciated!

    for (var i = 1; i & lt; = app.project.numItems; i ++) {}

    If (app.project.item (i) instanceof CompItem) {}

    model var = app.project.item (i);

    var textName = comp.layers.addText ('test');

    textName.threeDLayer = true;

    textName.position.setValueAtTime (0, [1248304.6823,-4720535.9958, 4092748.7335]);

    }

    }

    Zewt! You are a hero!

    I took an approach changed to your idea:

    I put int and decimal fractions of value as the positions on two null objects.

    Then I used an expression on the camera.position to combine these two values.

    Finally, I used this script I linked to convert expressions camera.position in keyframes and remove NULL values.

    That way I would create two distinct null objects and do not create two for each axis (x, y, z).

    In addition, the control slider has a limit of 1 000 000-1 000 000 which was not enough for what I had.

    For one in the future (or maybe me) who may fall on this solution.

    // Creating project
    var project = app.newProject();
    // Creating comp
    var comp = project.items.addComp('untitled', 1920, 1080, 1, 15, 30);
    // Open the comp
    comp.openInViewer();
    
    // Create a camera
    var cameraLayer = comp.layers.addCamera( 'Camera', [
      '${this.model.width / 2}',
      '${this.model.height / 2}'
    ] );
    
    var cameraPosition  = cameraLayer.position;
    
    var positionInts = comp.layers.addNull();
    positionInts.name = 'positionInts';
    positionInts.threeDLayer = true;
    
    var positionDecimals = comp.layers.addNull();
    positionDecimals.name = 'positionDecimals';
    positionDecimals.threeDLayer = true;
    
    // Set the int of all your values on the positionInts null
    positionInts.position.setValuesAtTimes(
        [0, 1, 2], [
            [4518810, -71312864, -2158705],
            [4522482, -71308958, -2158292],
            [4533658, -71297341, -2157044]
        ]
    );
    // Set the decimal of all values on the positionDecimals null
    positionDecimals.position.setValuesAtTimes(
        [0, 1, 2], [
            [0.6400621915236115, -0.80026875436306, -0.5924631282687187],
            [0.0393883166834712, -0.00048755109310150146, -0.32361961202695966],
            [0.004953828640282154, -0.6714665293693542, -0.026646549347788095]
        ]
    );
    
    // Create an expression on the camera position
    cameraPosition.expression = '[ thisComp.layer("positionInts").transform.position[0] + thisComp.layer("positionDecimals").transform.position[0] , thisComp.layer("positionInts").transform.position[1] + thisComp.layer("positionDecimals").transform.position[1], thisComp.layer("positionInts").transform.position[2] + thisComp.layer("positionDecimals").transform.position[2] ];';
    
    // Bake all the expression keyframes
    function convertToKeyframes(theProperty) {
        if (theProperty.canSetExpression && theProperty.expressionEnabled) {
            theProperty.selected = true;
            app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
            theProperty.selected = false;
        }
    }
    
    convertToKeyframes( cameraPosition );
    

    Thanks again for your contribution!

  • ADF table column display rounded value

    I have a table that I created by dropping a collection on a jspx.
    He has a column of type BigDecimal. for number of records, its value is as 0.3333333333337. This is defined by the external data source. However, there is no sense for the user to see such value in this column. I want to replace this behavior and display a value as 0.33 in this column where it displays the value as 0.3333333333337 and in general that two digits after the comma.
    How is it possible in 11 1 1 5 jdev

    Hello

    You can try these options as well if you want,

    "#1 option: place a component-> operations palette Converter->""on your field of adf table where you want to cut the number and you can set it as current/number/percentage and also give the number of maximum number of digits etc... (this option is appropriate if you do not want to touch your model layer)

    #2 option: change the level ViewObject.
    Go to your view object, select the attribute and go to the tab "User interface tips", select format type = "number" and to format = "#. #;(###.##) ' (or what ever fits for you)"

    Kind regards
    Nuka ravi

    Published by: Nuka Ravi on April 8, 2013 23:22

  • Used in forms for rule of rounding decimal values

    I am trying to determine what district to separate the rule using forms of round numbers decimal, extracted from the database to display in a shorter length field. Specifically, when a number is equidistant from its neighbours (e.g. 0.5 is equidistant between 0 and 1), which rule is used to determine if she is rounded upwards or downwards (see this for a reference of the standard rounding rules)? The online help documentation addresses rounded, but does not specify what rounding rule is used (for example half away from zero, even half or 'Banker of the borough', etc.).

    I tried to figure this out by trial and error, but make me inconsistent results. Here's my test case...

    In the two test cases:

    Database field is NUMBER (20.4)

    Form field is numeric, length 30

    Form field format mask, programmatically, set is FM999G999G999G999G999G999G999G999G999G999G999G990D90PR (i.e., round to 2 decimal places)

    The form field displays the value of the field database directly

    Test 1:

    Database field value is 1.4445

    Result: The screen displays the value as 1.44

    Test 2:

    Database field value is 1,445

    Result: The field of the screen shows the value of 1.45

    It's completely inconsistent. If 'half away from zero' or 'half of the odd' district were used, then the value 1 of the trial must be displayed as 1.45 (because the last 5 will round the previous 4 to 5 and repeat). On the other hand, if 'half zero' or 'half similarly' district were used, the value of Test 2 should be displayed as 1.44.

    I understand that the values stored in the form are not rounded, and that this will not necessarily errors of calculation. However, it is necessary for purposes of documentation that I determine what the current rule used to display rounded values.

    I use forms GR 11, 2.

    I thought about it (by another user). My hypothesis rounded is not accurate: 1.4445 would like to round up to 1.44 mathematically, not 1.45 because 1.0045 is closer to 1 than 2. Therefore, Forms uses the standard rounded technology Oracle, which is:

    1. If n is 0, then ROUND returns always 0 regardless of the integer .
    2. If n is negative, then ROUND (n, all) returns - ROUND (-n, whole).
    3. If n is positive, then ROUND (n, integer) = FLOOR (n * POWER(10, integer) + 0.5) * POWER (10, - all over)

    Source: incompatible tie rounding rule used in Oracle Forms to the decimal values - Stack Overflow

  • Value to round variable?

    Hi all

    I need to round the floating value, how to convert?

    Thanks in advance.

    Kind regards
    Sam

    Hi Sam,

    Use code below to make the rounded values.

    value = Math.round (value);

    Kind regards
    River. P

  • How to round the value of the

    Hello

    I'm new to sql can someone tell me how to round value.

    AM

    Hi Roman,

    Use can use Trunc

    Thank you
    -Anil

  • return only the decimal value

    What function can I use to return only the decimal value of a formula

    (97 * 2.2) / 14 value returns 15.24

    I only want to use le.24

    Salvation is

    Use the formula - INT (formula)

    In the special case above:

    =(97*2.2)/14 - INT ((97*2.2)/14)

    You see two places to the right of the decimal separator in reason to be rounded off to the value real, in the shape of the cell to only show as two decimal places, either by setting the width of the cell close enough to force the rounding of the displayed value.

    Note that if the result is rounded (using the ROUND function) the actual value of the cell will be the rounded value. For the other two cases, the value displayed indicates only two decimal places, but the real value in the cell (and the additional calculations used by referring to this cell) is 0.242857142857144, which could lead to surprises in the results of the calculations downstream.

    Kind regards

    Barry

  • Application function rounded to the whole of the channel

    I have a channel in tiara with a large amount of values (36,000,000) contain the values on 13 decimals.

    I would like to round the value to about 4 or 5 decimal places max.

    Can someone help me understand how to do this in DIAdem.

    Example:

    0.3784729837492-> 0.37847

    I want this for each value in the channel.

    can someone help me understand how to do this?

    Thanks in advance,

    Tom

    From D-cubed method of work, but with 36,000,000 points given, it will take a lot of time.  Use the calculator.  Copy this function in the ECU for analysis, and it will happen almost instantly.  Replace the 3 by the desired number of decimal places.

    Ch("[1]/Channel") = Round (ch("[1]/ChannelToBeRounded"), 3)

    If you need a VB Script:

    Dim ChannelToRound, DecimalPoints

    ChanneltoRound = "[1]" / ChannelToBeRounded " ' set the channel to round here"
    DecimalPoints 6 = ' specify the number of decimals

    "This will create a new channel called"Channel"in Group 1 with the rounded values

  • Help with a custom calculation for rounding up/down in Adobe Pro

    Hello!  I've never written a custom calculation, so I'm lost; could someone help me please write one round to high-low a.50/.49 with this field name:

    CreditedTotalLocal + OtherHE

    For example, if the value of this field, which is the result of the function "value is the sum of the (+) of the following fields" on two fields named CreditedXXXXLocalHE and CreditedOtherHE - between 3.0 and 3.49, this field should be 3.0.  If the value is 3.50 to 3.99, the field should show 4.0.

    I'm sure it's very simple, but I've tried some things from this and other forums without success.  Help, please!

    Thanks in advance,

    Kim

    Instead of using the "field is the sum of the following fields:" or him simplified "Field Notation" you need a custom as a calculation script

    function myRound (n, d)
    {
    / * By d. P. story
    http://Math.uakron.edu/~dpstory/acrotex/elementary/rounding.PDF
    */
    n = String(n).replace(/^,$/g,""); "
    d =-1 * d
    var m = Math.pow(10,d);
    n * = m;
    n = Math.round (n);
    n / m =;
    d = ( d > 0 ) ? d: 0;
    n = n.toFixed (d);
    return n;
    }

    var nResult = this.getField("CreditedXXXXLocalHE").value + this.getField("CreditedOtherHE").value;
    Event.Value = myRound (nResult, 0);

    or

    function DoubleRound (nValue, nDec)
    {
    var nResult = Math.round (value * Math.pow (10, nDec + 1)) / Math.pow (10, nDec + 1);
    return Math.round (nResult * Math.pow (10, nDec)) / Math.pow (10, nDec);
    }

    var nResult = this.getField("CreditedXXXXLocalHE").value + this.getField("CreditedOtherHE").value;
    Event.Value = DoubleRound (nResult, 0);

    The above two functions to round the values decimal, myRound use - Dec for the decimal value to be rounded so that the DobuleRound use the positive value for the decimal number or powers of 10 as the 1,000 with the 3 myRound and -3 for DoubleRound.

  • Ask the question round

    Hi Xperts

    Please I need your help with this issue: I'm a test procedure in Oracle and I have little difference in the result. I found it s because the trick works in one of the cursor of the SPs.

    -Original query

    Select ROUND (SUM (Z.NUM1 + Z.NUM2 + Z.NUM3), 2) quantity OF TAB1 Z

    JOIN TAB2 B ON B.COLA = Z.COLA AND B.COLB = 19 AND B.COLC = B.COLD

    WHERE Z.COLA = 123456

    Quantity

    2872.06

    -Updated the Query

    SELECT SUM (Z.NUM1 + Z.NUM2 + Z.NUM3) quantity OF TAB1 Z

    JOIN TAB2 B ON B.COLA = Z.COLA AND B.COLB = 19 AND B.COLC = B.COLD

    WHERE Z.COLA = 123456

    Quantity

    2872.065

    -Updated the Query

    SELECT round (quantity 2), the amount

    CEN

    SELECT SUM (Z.NUM1 + Z.NUM2 + Z.NUM3) quantity OF TAB1 Z

    JOIN TAB2 B ON B.COLA = Z.COLA AND B.COLB = 19 AND B.COLC = B.COLD

    WHERE Z.COLA = 123456

    )

    Round(Quantity,2) |  Quantity

    2872.06 |     2872.065

    -TEST QUERY

    Select round (2872.065, 2) of the double

    ROUND (2872.065,2)

    2872.07

    I'm not able to find the reason why Oracle round 2872.065 to 2872.06, I think the correct answer is 2872.07

    My configuration:

    Oracle Rac two nodes 11 GR 2 (11.2.0.3)

    OEL 6.3

    That you for your time

    JUDGE

    Hello

    The judge wrote:

    ...

    Is there an implicit round Oracle? I can see that when I use Trunc?

    ...

    There is an implicit round on the numbers displayed in SQL * more.  As Solomon has demonstrated, it is governed by NUMLARGEUR.   If NUMLARGEUR is 10, NUMBER of columns will be 10 characters long.   So if NUMLARGEUR is 10, then SQL * more may not display 2872.0649999 exactly. which would take 12 characters, so if a round value, 2872.06499 or 2872.06500.  He chose 2872.065000, since it is closer to the real value, and since the leak of 0 after the decimal point are displayed, what comes out as 2872.065.

    TRUNC, as you have discovered, is a way to demonstrate that the amount is not exactly 2872.065.  Another would be TO_CHAR (quantity).  NUMLARGEUR applies only to numbers and TO_CHAR returns a VARCHAR2.

    I don't know much about Toad, but I'll be there a feature similar to NUMLARGEUR.  In your example it looks like toad was a NUMLARGEUR (Toad probably call it something else) 8.  The true value of TRUNC (number 7) is 2872.064999, but which takes 11 characters to display.  If you can use only 8 characters, then 2872.065 is as close as you can get.

  • Numbers/Currencys rounded and decimal, etc.

    Hello
    I have the following values in Siebel:

    €201,88
    €260,10
    €6.01
    €252,45

    The result desired here is that BI Publisher displays these exactly as Siebel.
    In addition, I suppose that if we no. cents at the end, it should display, 00

    When to just display the name of the field, we had problems, such as:
    -Wrong number of decimal places shown.
    -Symbol of the euro not displayed. (This I fixed to hardcode simply the EURO symbol in the rtf).
    -No 'rounding' values correctly.

    Looking around, I found xml, and managed to do it work somehow, the XSL language is:

    <? format-number (round ((100 * translate (ItemPrice, ",","")) div 1000), "" ")? >

    I tried different things as the last parameter, such as # or 00 or something.

    In any case the underlying theory to the above is:
    -Remove commas from the ItemPrice (function definition).
    -Times it by 100 and round the result.
    - Then divide by 1000
    -format in a certain way.

    The values obtained on the report are:
    €20 188
    €260
    €601 163
    €2 525

    I noticed in writing that we are * per 100, but perhaps * by 1000 and changed the xsl as follows:
    <? format-number (round ((1000 * translate (ItemPrice, ",","")) div 1000), "#, #.") 00')? >
    That gives the following result
    201 875,0
    € 0
    2 €601,00
    6 011 625
    €00
    25 245.00


    I also tried 100 on each side:
    201 875,0
    € 0
    2 €601,00
    6 011 625
    €00
    25 245.00


    Does anyone know how to get the correct result:

    €201,88
    €260,10
    €6.01
    €252,45

    Two step process:
    1 set the format: * ++ *.
    2. use the format: * ++ *.
    See you soon,.
    ND
    Use the buttons "useful" or "correct" to award points to the answers / mark the thread as answered, if your question is answered.

  • BitmapData with decimal values

    Hello

    I use bitmapdata feature with decimal value. But it takes only a round value. It's all possible ways to do... ?

    If I give as below,

    desBmp = new BitmapData (163,9, 192,9);

    It takes like,

    desBmp = new BitmapData (163, 192);

    I want the exact value to be considered as the width and height. Is there any option to do, of trying to help me.

    Kind regards

    Kelifaoui has.

    is not possible and there is no reason: you can't use a fraction of a pixel in the display.

    for smoothing, use the smooth parameter with the draw method.

  • Math.Round for shape layers land on whole pixels?

    Trying to keep my shape on whole pixels layers to avoid blur of subpixel.

    For one-dimensional properties, it works fine:

    Math.Round (value);

    But for two dimensional props, I am running into errors with this stuff:

    Temp = Math.round (content("Rectangle_1").content ("mapped Rectangle 1") .value .size)

    (temp [0], temp [1])

    Temp = Math.round (content("Rectangle_1").content ("mapped Rectangle 1") .size)

    (temp [0], temp [1])


    I don't know that my syntax is off. Real estate in berries always give me problems. Can you help me?

    Missing just a semicolon at the end of the first line.

    In response to your second question, Yes - in fact it works:

    [Math.round(value[0]), Math.round(value[1])]

    Dan

Maybe you are looking for