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.

Tags: Database

Similar Questions

  • If you ask the question and then choose a solution, the thread will be closed or still can you ask more details?

    If you ask the question and then choose a solution, the thread will be closed or still can you ask more details?
    (sometimes, someone answers my question, and I want to mark it as the solution and am not yet quite ready for the thread be closed...)

    If you still experience this issue, you can return to this thread.
    But, you must clear the flag solved .

  • When I change something on security on my ID must be answered first ask the question what city meet my parents and 2nd question asking my best teen kindly helps a friend me

    I have my iPhone dicice 5s that fall into the water are all gone now, I have 6 s iPhone and try to restore data from Icloud, but when open my ID question 2 which, what city you parents encounter and which is better, your teenager, pickled

    kindly help me out on this issue.

    Thank you

    Florent

    See: If you forgot your Apple ID - Apple Support security questions answered

  • My colors are not displayed correctly. I already asked the question, but here's the screenshot also.

    There is no apparent way to upload the screenshot I did not. Not a very intuitive site.

    Continue in your old thread and fix the image here.

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem (on the wire, linked above).

  • I already asked the question until you asked me to log in

    I'll ask him again.

    Is it possible to import the contacts on my Motorola Moto G 4 G phone to my new Macbook Pro?  and if so, how?

    Thank you.

    Just where the Contacts on the phone? They are in a Google account? or other similar account? If yes then yo can just sync your contacts on the Mac with your Google contacts.

    If they are associated with an account that has a web interface, including Google, you can usually export then if a format like CSV (coma separated variables) and then import them into your Mac Contacts.

  • I'm embarrassed to even ask the question, but: what 'this' refers to?

    I'm losing the plot trying to Google "this." It is not just to work. BUT I found a description by looking at the index of the ActionScript 3.0 documentation. http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/statements.html#this

    Here it is:

    "A reference to a method that contains the object. When a script is executed, the this keyword refers to the object that contains the script. Inside a method body, the this keyword refers to the instance of the class that contains the called method. »

    for example, to access a property or method of a method in the same category, you type: this.method () or this.property, right? "I'm sure that it works without '.', but it confuses me because I learned PHP prior to ActionScript, and you need always"this->"in this case.

    In addition, that the Eggplant "this" refers to when it is used for the main timeline (not within a class)?

    PostScript:

    Sorry for the word 'this' so... cela.

    1. I think that the explanation of Ned linking this keyword to the timeline is limited because timeline can be a MovieClip instance attribute only, while the keyword this refers to the scope of the proceeding of ANY AS3 object. Main index is the INSTANCE of word. So, this keyword is much broader meaning and usage.

    2. Although it is true that among the amenities of this isn't to use it as an associative array, I would not that it is the main use. In my view, well-designed OOP applications the is not necessary for the associative array syntax because there are many more effective approaches to reference properties.

    "I won't need to use the statement 'this' to access the other methods and properties in the same class."

    You should review.

    Some examples when this is useful:

    A. methods parameters vs example properties/methods, naming conventions.

    In of this example of method parameter property and an instance with the same name, but there is no confusion:

    private var width:Number;
    
    public function changeWidth(width:Number):void {
        this.width = width;
    }
    

    (B) the property of the instance and variable from the method names are the same. Once again, the references are clear:

    private var myVariable:String;
    
    private function doSomething():void {
        var myVariable:String = "BLAH";
        this.myVariable = "ANOTHER BLAH";
    }
    

    Also, although AS3 does not support overloading, you can call the methods their reach to this or super.

    override protected function myFunction():void {
    
    }
    
    private function callMyFunction():void {
        this.myFunction();
        super.myFunction();
    }
    

    In addition, when static vs. instance possedantes/methods are used - can not brought those static for this which is sometimes useful as well.

  • How can I take screenshot on Mac OS to ask the question here?

    In Mac OS 10.6

    I want to take a screenshot of part of my Arrtboard with panels open to put a photo here of a few problems I encounter, but when I Grab mode, it hides all my panels and shows that my work plan.

    How can I take a screenshot of the artboard and signs?

    Thank you.

    Command-Shift-3

    or

    Command + shift + 4

  • Why do help answers address the question

    My cursor by default is the upper left corner and I want to its default value of the upper right
    When I ask the question how to change that, the answers have NOTHING to do with the sliders and not come close to answering the question
    How can I change the default cursor position?

    Hi ilikefree09, when you click on a link in a web page, when the new page opens, the cursor normally is not placed in a particular place in the page. Instead, the 'focus' is on the body of the entire page. So, if you press the arrow key down, the page should scroll; If you press Ctrl + a, the content of the body must be selected.

    Sites can change this basic behavior by using a script to set the focus to a particular item. For example, Google moves the focus to the search box.

    I don't know of any integrated setting to change this.

  • Ask a question on two occasions due to a business rule

    Hi all

    I have a requirement where I have to ask for the new value of a number attribute in the same interview soon I already answered it according to a business rule.

    for example, consider the following
    The application form is complete if
    The applicant's age is known
    
    {The applicant's age is a Number}
    *(but a hypothetical Business Rule is: if the age is under 18, Ask the question Again) *.

    i.e.
    Interview 1:
    What is applicant age: *20*
    The application form is complete
    Interview 2:
    What is applicant age: *15*
    What is applicant age: *13*
    The application form is complete
    Interview 3:
    What is applicant age: *12*
    What is applicant age: *12*
    The application form is complete
    Is there a workaround solution.

    I hope this helps.
    Thank you

    Idea 1:+ warning use a rule like:

    Warning ("you said that your age is less than 18 years of age.  If this is correct, press the submit button. ") If
    age of the applicant<>

    This will cause a warning message on the screen, but (unlike an error event) it allows the user to proceed with the interview.

    Idea 2:+ create a second age attribute. If the value of the first attribute of age is less than 18 years of age, ask the second. Of course, this creates a risk of inconsistent data (such as your scenario 2), so you would need additional rules to resolve the contradiction.

    I'd go with the first approach, personally.

  • The question regarding the positioning (differences between Design view and live view)

    I don't know how to perform the same search to see if this has been asked, nor how to properly ask the question... but here goes...

    I have a div id "container" which is limited to large 968px.  Inside that I want to have 2 columns (one containing nothing else than a background image) next to each other.

    I called a left_column and other right_column.

    The background image will be in the left column and is high by wide 290px 550px.

    I used CSS to define the following:

    {#left_column}

    background-color: #FFF;

    background-image: url (.. / images/waterfall.jpg);

    background-repeat: no-repeat;

    position: relative;

    height: 550px;

    Width: 290px;

    margin-right: 10px;

    float: left;

    }

    {#right_column}

    height: 550px;

    Width: 650px;

    margin-left: 10px;

    padding-left: 12px;

    position: relative;

    left: 10px;

    }

    In "design mode" everything seems wonderful.  When I go to the live view (and/or browserlab) the text in the right-hand column shows the usable space is only 300px.

    If I change the width of the right_column to 'auto' can live view (and/or browserlab) everything seems all I want, but in the view design right_column width is closer to 900px and goes the WAY out of the container (which makes it very difficult to see the text as I type).

    No idea what I messed up?  What other details do you need?

    Thanks in advance.

    mikemendo wrote:

    I wanted the left and right columns to be the same height, so the footer doesn't look like it has been 'floating' lower from one side to the other.  The width is controlled by the banner image 968px.

    Columns of Google to 'false '. It is a technique that requires a background image set to "container".

    . The image is repeated behind the "right column
    to fill the depth and give the impression that the two columns are of equal height.

    mikemendo wrote:

    In the left column photos is a background image, so if I put the height and width, then the image is not of appropriate size.  The reason why I did a background image was to follow the advice of David Powers in his article on "your first site.

    This technique is good to use.

    At present the total width of all your elements adds to 982px that is wider than your container attached to 968px. Margin and padding ARE added to the width of a 'container' if:

    290px + 10px = 300px

    650px + 12px 10px 10px plus 682px

    TOTAL = 982px

    You can adjust the math for the total width does not exceed the width of your "container".

    Use this css and everything should work:

    #container {}

    overflow: hidden;

    margin: 0 auto;

    Width: 968px;

    background-image: url (.. / images/rightColBg.gif)

    background-repeat: repeat-y;

    }

    {#left_column}

    background-color: #FFF;

    background-image: url (.. / images/waterfall.jpg);

    background-repeat: no-repeat;

    Width: 290px;

    margin-right: 10px;

    float: left;

    }

    {#right_column}

    Width: 656px;

    padding-left: 12px;

    float: left;

    }

    #footer {}

    Clear: both;

    }

  • Oracle - the question of the integration of MS Access

    Guys,

    Yesterday I asked the question of the integration of Oracle and Access, and I got the answer through oracle heterogeneous services, you can connect to ms access to insert/update of the data.

    I had another thought on direct vs. indirect integration method.

    1. with the help of XML to send and receive data between oracle and MS. Access.
    Have a specified location where oracle will generate xml file and within the specified time interval ms access checks the file and the process
    This file. Even reverse access can generate an XML and oracle can process this file with working hours.

    2. using heterogeneous services - seems to be a free service as I could find MS Access driver online

    If immediate information is required in the two system then I have no choice but to use heterogeneous services? * *

    If information can wait for labor scheduling, I intend to propose the approach 1 (generate/process xml file). If both systems are not really dependent on each other

    Everything I need to examine or missing / or one is better than another?

    Another approach would be a JDBC connection: load in the BDD Oracle JDBC driver, then opening the link to MS Access using JDBC. The disadvantage of this solution is that you all on your own code.

    While a 'real-time' ready-to-use application, DG4ODBC (HSODBC product tracking) is the right choice.

    As MS Access can also get data via ODBC, why not link tables Oracle in MS Access and loading of XML content in MS Accesss using a scheduled task, you can trigger then just selects and inserts. For this approach, you just need to have an ODBC Oracle driver installed where your MDB file.

  • How can I FIND the question I asked before to see if there is an answer

    Where is that I should go to locate the question I posed and answers available, as appropriate.

    I've seen this question asked in a generally similar manner and the author of the question was directed to go to the location of their question to show all responses that might have been given - but there's nothing telling us how they came to this place. How do you get there?

    Suggestion: A user having to log-in to ask a question, then once a user logs in, it would be great if they could see a list of the questions they asked, and maybe a link that will lead to the location of this question and the answers that could have been provided by the community.

    A friend showed me how to locate my question (s). Thank you.

  • What happened to the questions I asked in recent years?

    When I fly over my user name at the top of the support forum for mozilla and then click on 'My issues', I'm only showed my last two questions. What happened to all the question I asked in recent years? In addition, I'm more able to achieve this through getsatisfaction.comforum.

    Get satisfaction has been disabled in the past months. It's now the support forum. Nothing in the history was moved to the wire.

  • What is the latest version and how do I know what it is without having to ask this question?

    What is the latest version of Firefox and where can I find this information without having to ask this question. The reason why I need to know is that Firefox is unable to update for some reason any and it tells me to check and make sure I have the latest version. I have version 26 but don't know if it's the latest version.

    Hello rtyson01, firefox 27 is the last version for now. You can check on https://www.mozilla.org/en-US/firefox/releases/

  • How can I find the question I ask on your website?

    I don't know where I asked on your website to find the question or answer key!

    I lost my question, too. But I think I found it. Go to Forum Home Support. (The link is on the right side of the page web or go directly: https://support.mozilla.com/en-US/questions ) A little ways from the header, there is a way to sort the comments, like "Most recent" and "Most often requested." Let your eyes go further to the right on that even online where the filter allows you to select 'my Contributions '. If your question has been asked in the Support Forum, you may be able to find it in this way. Good luck.

Maybe you are looking for