Problem with round

Hi!!!
I have a dude. When I use select round((9013.99/12)*6,2) from dual; the result is 4506.99. Why?? I think it should be 4507. Is it a problem with sqlplus? or I should set a parameter?
Regards.

Just assuming, these might be the reasons for differing in results. Not sure, what oracle is doing inside! Check below scenarios.
-- Check 1(Pass computation value then change it to NUMBER for assuring ROUND() of understanding to treat the exact display value!)
select val, round(to_number(val), 2) res
from
(select (9013.99/12)*6 val from dual)
       VAL        RES
  4506.995       4507
-- Check 2 ( Pass a static number)
select val, round(val, 2) res
from
(select 4506.995 val from dual)
       VAL        RES
  4506.995       4507
-- Check 3 ( Initial oracle computation might not be the exact number value which round is getting here as parameter!)
select val, round(val, 2) res
from
(select (9013.99/12)*6 val from dual)
       VAL        RES
  4506.995    4506.99

Similar Messages

  • Problem with rounding in standard cost estimate.

    Hi All,
    Happy 4th of July!
    I have a problem with the standard cost estimate where the system try to calculate overhead costs (from costing sheet) with a fix percentage (9.7%) to the value coming from material consumption costs element.
    Let say I have $1.71 material consumption and the overhead rate of 9.7%
    The real calculation should be (1.71*0.097) = $0.16587
    But at CK11N screen, it shows only $0.16 (two decimal rounding)
    Is there a way that I can bump the rounding to at least 3 decimal point to make it more accurate?
    Very appreciate any input you guys can share. Thank you.
    Charitha

    Hi Chari ,
    My experience says that you can use only 2 decimals ..
    Moreover , please have a look into SAP Note : 639410 - CK11N, CK13N: Message CK869 due to rounding
    differences.
    There a some source code corrections also on rounding differences- check if it helps you also...
    Regards
    Sarada

  • Problems with 'Round Corners'

    Hi everbody,
    First of all, sorry for my bad englisch. I'm German
    Here's my problem:      step 1: i'm writing a word and then i'm using the effect ‘create outlines‘ in the type menu.
                                      step 2: after that i'm using the filter ‘round corners‘
                                       But not all corners are round after that. I've problems with the letter ‘S‘. Just 2 corners are round and the ohter two are                                    unchanged.
    Does anyone know what the problem could be?
    Thank you very much!
    Simon

    Simon,
    I see what you see.
    Unless you have CS6, you should be able to use the free Round Any Corner script on the relevant Anchor Points, available here:
    http://park12.wakwak.com/~shp/lc/et/en_aics_script.html

  • Problem with Rounded Corners on EPS object in Illustrator CS3

    I'm using Illustrator CS3 and I have an EPS object which has rounded corners. When I export  the object and save it as a JPG the exported image takes on the shape of  the artboard (which is a square) rather than the shape of the EPS  object which is a square with rounded corners. I've placed the exported  JPG into my blog but when I look at it I can see a little bit of white  in each of the four corners. What can I do to stop this from happening?  In other words, I want my exported JPG image to have rounded corners  without the white. Please provide me  with as much detail as you can as I'm fairly new to Illustrator and I'm still finding my way. Thank you.

    Hi Graccon,
    The JPG format does not support transaprency. Either save as a gif or as a png. Or choose a matte color which matches your page background for the jpg.

  • Problem with rounding

    I have a problem whith a Float datatype.
    In my database i have a column with datatype NUMBER(9,2), in my Entity Object the column is defined like Float and also i use Hint format mask: #,###,##0.00.
    When i try to introduce the following number 9,999,999.99 gives me a rounding to 10,000,000.00, but if i introduce -for example- the number 999,999.99 that works fine and not apply the rounding.
    I don't have a clear idea about what's happen. Please help.
    MARCO H.

    Hi:
    I removed the Format mask and the problem continues. I perform a debug and i note a difference: i have two decimals but the value in Debug appears with one decimal.
    For example:
    Value captured: 999999.61
    Value showed in tester: 999999.6
    Value in Smart data screen Debug: 10000000.0
    My Table in the Database:
    Name Null? Type
    IDARTICULOLEY NOT NULL VARCHAR2(3)
    SECUENCIA NOT NULL NUMBER(2)
    LIMINFERIOR NUMBER(9,2)
    LIMSUPERIOR NUMBER(9,2)
    CUOTAFIJA NUMBER(9,2)
    PORCENTAJE NUMBER(4,2)
    My Entity structure in JDeveloper:
    <Entity
    Name="RhSubsidio"
    TimeStamp="1034901363164"
    DBObjectType="table"
    DBObjectName="RH_SUBSIDIO"
    AliasName="RhSubsidio"
    BindingStyle="JDBC"
    UseGlueCode="false"
    CodeGenFlag="205"
    RowClass="Catalogos.RhSubsidioImpl"
    MsgBundleClass="Catalogos.common.RhSubsidioImplMsgBundle" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="9.0.3.9.62" />
    <AttrArray Name="_publishEvents">
    </AttrArray>
    </DesignTime>
    <Attribute
    Name="Idarticuloley"
    IsUpdateable="while_insert"
    IsNotNull="true"
    Precision="3"
    Type="java.lang.String"
    ColumnName="IDARTICULOLEY"
    ColumnType="VARCHAR2"
    SQLType="VARCHAR"
    TableName="RH_SUBSIDIO"
    PrimaryKey="true"
    RetrievedOnUpdate="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="3" />
    </DesignTime>
    <ListValidationBean
    OnAttribute="Idarticuloley"
    OperandType="JBO"
    ListValue="CatalogoVista.RhArticuloleyView.Idarticuloley" >
    </ListValidationBean>
    </Attribute>
    <Attribute
    Name="Secuencia"
    IsUpdateable="while_insert"
    Precision="2"
    Scale="0"
    Type="java.math.BigDecimal"
    ColumnName="SECUENCIA"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="RH_SUBSIDIO"
    PrimaryKey="true"
    RetrievedOnUpdate="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="2" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="Liminferior"
    Precision="9"
    Scale="2"
    Type="java.lang.Float"
    ColumnName="LIMINFERIOR"
    ColumnType="NUMBER"
    SQLType="FLOAT"
    TableName="RH_SUBSIDIO" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="0" />
    </DesignTime>
    <RangeValidationBean
    OnAttribute="Liminferior"
    OperandType="LITERAL"
    MinValue="0.00"
    MaxValue="9999999.99" >
    </RangeValidationBean>
    </Attribute>
    <Attribute
    Name="Limsuperior"
    Precision="9"
    Scale="2"
    Type="java.lang.Float"
    ColumnName="LIMSUPERIOR"
    ColumnType="NUMBER"
    SQLType="FLOAT"
    TableName="RH_SUBSIDIO"
    RetrievedOnUpdate="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="0" />
    </DesignTime>
    <RangeValidationBean
    OnAttribute="Limsuperior"
    OperandType="LITERAL"
    MinValue="0.01"
    MaxValue="9999999.99" >
    </RangeValidationBean>
    </Attribute>
    <Attribute
    Name="Cuotafija"
    Precision="9"
    Scale="2"
    Type="java.math.BigDecimal"
    ColumnName="CUOTAFIJA"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="RH_SUBSIDIO" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="0" />
    </DesignTime>
    <RangeValidationBean
    OnAttribute="Cuotafija"
    OperandType="LITERAL"
    MinValue="0.00"
    MaxValue="9999999.99" >
    </RangeValidationBean>
    </Attribute>
    <Attribute
    Name="Porcentaje"
    Precision="4"
    Scale="2"
    Type="java.lang.Float"
    ColumnName="PORCENTAJE"
    ColumnType="NUMBER"
    SQLType="FLOAT"
    TableName="RH_SUBSIDIO" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="0" />
    </DesignTime>
    <RangeValidationBean
    OnAttribute="Porcentaje"
    OperandType="LITERAL"
    MinValue="0.00"
    MaxValue="99.99" >
    </RangeValidationBean>
    </Attribute>
    <AccessorAttribute
    Name="RhArticuloley"
    Association="Catalogos.SubsidioArtleyFkAssoc"
    AssociationEnd="Catalogos.SubsidioArtleyFkAssoc.RhArticuloley"
    AssociationOtherEnd="Catalogos.SubsidioArtleyFkAssoc.RhSubsidio"
    Type="Catalogos.RhArticuloleyImpl" >
    </AccessorAttribute>
    <Key
    Name="SubsidioPk" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Idarticuloley" />
    <Item Value="Catalogos.RhSubsidio.Secuencia" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SUBSIDIO_PK" />
    <Attr Name="_isPrimary" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="RhSubsidioIdarticuloleyCheck" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Idarticuloley" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="RH_SUBSIDIO_IDARTICULOLEY_CHEC" />
    <Attr Name="_checkCondition" Value="&#34;IDARTICULOLEY&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="RhSubsidioSecuenciaCheck" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Secuencia" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="RH_SUBSIDIO_SECUENCIA_CHECK" />
    <Attr Name="_checkCondition" Value="&#34;SECUENCIA&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00123562" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Idarticuloley" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C00123562" />
    <Attr Name="_checkCondition" Value="&#34;IDARTICULOLEY&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00123563" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Secuencia" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SYS_C00123563" />
    <Attr Name="_checkCondition" Value="&#34;SECUENCIA&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    </DesignTime>
    </Key>
    <Key
    Name="SubsidioArtleyFk" >
    <AttrArray Name="Attributes">
    <Item Value="Catalogos.RhSubsidio.Idarticuloley" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_DBObjectName" Value="SUBSIDIO_ARTLEY_FK" />
    <Attr Name="_referencedKey" Value="ARTLEY_PK" />
    <Attr Name="_isForeign" Value="true" />
    </DesignTime>
    </Key>
    </Entity>
    I tried your scenario with a NUMBER(7,2) and was able to properly set values like 99,999.99.
    How are you performing the formatting and validating the rounded result? If you have a small testcase we could certainly debug it as to where the rounding is occuring?

  • Problems with rounding keyfigures in Webi report

    Hi,
    we have the next scenario, we have a SAP BI connected to a Universe using XIR3.1 BO version ( with the integration kit).
    When we do a report with totals using the Webi the keyfigures results haven't the expected values, if we check the values in the cube (listcube) or by a SAP BI query we get the correct values.
    We have found that the difference comes from the moment the webi report do the rounding, when we filter the query by a excluding value it seems that the rounding is done at the level of the excluding object
    Example:
    We have the quantity sales (quantity 3 decimals) at the country level displayed without decimals, at that level the totals figures match with the data displayed in the infocube in SAP BI, when we filter excluding a customer of the country the figures don't match, the quantity sales are rounded at the customer level and then are aggregated, the customer is not displayed in the report.
      Report without excluding customer:
    WEBI report                                                             Infocube / SAP BI query 
       Country     Quantity                                                  Country     Quantity
        ES             287574                                                       ES             287574
        AD                1400                                                       AD                1400
    Report excluding customer  157
       Country     Quantity                                                  Country     Quantity
        ES             274456                                                       ES             273106
        AD                1400                                                       AD                1400
    To found were is the difference we have done a query including in the drilldown the customer, rounding at that level and doing the totals as the sum of that values we have the same values in the webi report and in the SAP BI Query and it is equal to 274456 In the other case if we sum the values of the customers without rounding and we round the total the values is the 273106.
    As the diffence it is great for the business, we need to found a way to do the rounding only in the level displayed in the report.
    We have expirience in other BO projects without sap integration and we have not found that issue, it is because that we included it in the forum of the SAP integration kit.
    Many Thanks in advanced.
    Nuria

    Hi experts!
    We have a similar problem to Núria and it persists after applying the instructions given by Stratos.
    Our scenario is BO Enterprise XI 3.1 SP2 and Integration Kit for SAP 3.1 SP2.
    I have a Universe connected to a SAP BW query 7.0. When I execute a report with WebI the results doesn't match.
    We found a problem rounding quantities. The curious thing is that only happens when the quantity is "UN". In this case rounds and truncates all decimals. So, if the Quantity is 0,45 UN in BW, in Webi report is 0.
    If the Quantity is in "KG" or "L" there aren't any problem. I've seen in the BW table SUNIT that the only difference is that the field "UN" its called "ST" in the table, what makes me think that maybe the problem is related to languages. But I have no idea.
    Any suggestions?
    Thanks in advance!
    Isaac

  • Problem with ROUND in *WHEN/ENDWHEN

    Hi, experts!
    We use SAP BPC 7.5 sp05 MS version on SQL Server 2008.
    We have  accounts with value
    AC1 = 27
    AC2 =  6
    AC3 =  5
    and want calculate AC4 = (2AC1 - AC2 - AC3)/2, the result should be as AC4 = (227 - 6 -5)/2 = 21,5
    we use following Script
    *XDIM_MEMBERSET P_ACCT= AC1, AC2, AC3
    *WHEN P_ACCT
    *IS AC1
    *REC(EXPRESSION = (2*%VALUE% - GET(P_ACCT = "AC2") - GET(P_ACCT = "AC3"))/2, P_ACCT = AC4) 
    *ENDWHEN
    *COMMIT
    After exution of script result is rounding, and AC4 = 21
    We check fact tables specification for Application  on SQL Server, and field SIGNEDDATA has type decimal(25,10)
    Also then we save values with decimal number (1,25 ; 1,3333 etc) from Excel it saves and displayed correct.
    Best regards,
    Iaroslav

    I try 4 examples for AC5 = 3 and get following results,
    *REC(EXPRESSION = %VALUE%/2, P_ACCT = AC4)   --- result  AC4 = 1
    *REC(EXPRESSION = %VALUE%*0.5, P_ACCT = AC4)   --- result  AC4 = 1
    *REC(FACTOR = 0.5, P_ACCT = AC4)                              ---- result AC4 = 1.5
    *REC(FACTOR = 1 / 2, P_ACCT = AC4)                            ---- result AC4 = 0
    I think bug in EXPRESSION and in  division " / " .
    Thank you

  • Problem with rounding quantities

    Hi,
    When we enter some quantity in the sales order it correctly rounds according to the rounding profile for that particular material but when doing the same for quotations, it doesn’t consider the rounding profile.
    Could you please help me fix this problem
    Regards
    Hrishi

    Problem solved. The item category was different for sales order and quotations. Did assigned the rounding permitted tick for quotations item category(in vov7) and its working now.
    Thanks & Regards
    Hrishi

  • Problem with round corners..the server said it is MBssss of traffic created because of that?

    1)
    The problem only occurs when the visitor is using Internet Explorer (and possibly only some versions of IE)
    2)
    The problem is that the file pie.js is being loaded many times for these Internet Explorer visitors, causing your traffic to be higher than usual, and our server can potentially blocking the visitor temporarily for requesting the same file many times in a short period.
    3)
    The file pie.js is meant to show cool effects like rounded corners and background effects in Internet Explorer (those cool effects work fine without pie.js for other browsers, so pie.js is only loaded when the visitor is using IE). I assume on your web site, it’s for the rounded corners on some of your borders, like the testimonials box.
    4)
    The file is being loaded by another file on your web site, called museutils.js
    5)
    Museutils.js is part of “Adobe Muse”, a web design solution that I’ve never heard of until now. Either your current web developer uses it, or someone who developed your site in the past used it to create your site.
    6)
    I believe there is a bug in the programming of museutils.js causing it to reload pie.js many times
    7)
    This bug may be a new one that has been introduced in a recent version of Adobe Muse.

    Thank you very much for reporting this problem. We'll fix it for the next release.

  • Problem with rounded in casting

    Hi all
    I have an int and a float, thjat could be 1, 0.1, 0.01.
    Then I need two operations: int / float and int * float; I am interested only on a integer part, but if I have (int) (int * float) I have a rounded error.
    Is there a method for solve this situation or I can write myown?
    If I make (int) (60 / 0,001) I obtain 59999 ... why?
    Many thanks

    int result = Integer.ValueOf( Float.ValueOf( intVal ) / floatVal);
    Does it works?
    Even if that compiled, which it doesn't, it wouldn't.
    Math.rint(), however, may be of use.

  • Problem with ROUND & DIVIDE Function

    Hello All,
    I am dividing 4000 by 3 and rounding the result to 7 decimal places.
    SELECT ROUND((4000/3),7) FROM DUAL;
    Above query is giveing the result as 1333.3333333.
    When I multiply 1333.3333333 * 3, Its giving 3999.9999999 instead of 4000.
    SELECT 1333.3333333 * 3 FROM DUAL;
    I need 4000 when I do Multiply.
    Appreciate your help.
    Thanks
    MN

    MNRajan wrote:
    Hello All,
    I am dividing 4000 by 3 and rounding the result to 7 decimal places.
    SELECT ROUND((4000/3),7) FROM DUAL;
    Above query is giveing the result as 1333.3333333.
    When I multiply 1333.3333333 * 3, Its giving 3999.9999999 instead of 4000.
    SELECT 1333.3333333 * 3 FROM DUAL;
    I need 4000 when I do Multiply.
    Appreciate your help.
    Thanks
    MN
    SQL>SELECT round(round((4000/3),7)*3) FROM DUAL;
    ROUND(ROUND((4000/3),7)*3)
                          4000

  • Problem with the round function using Date

    Hi,
    I have a problem with round function for Date. The input is the four digit year which was picked out from say SYSDATE.
    In these scenarios the original value should be rounded up and should get the output as shown under rounded column.
    Scenario1
    Original Rounded
    2020 ---> 2020
    2021 ---> 2020
    2022 ---> 2020
    2023 ---> 2020
    2024 ---> 2020
    2025 ---> 2025
    2026 ---> 2025
    Scenario2
    Original Rounded
    2020 ---> 2020
    2021 ---> 2025
    2022 ---> 2025
    2023 ---> 2025
    2024 ---> 2025
    2025 ---> 2030
    2026 ---> 2030
    Scenario3
    Original Rounded
    2020 ---> 2020
    2021 ---> 2020
    2022 ---> 2020
    2023 ---> 2025
    2024 ---> 2025
    2025 ---> 2025
    2026 ---> 2025
    Can anyone help with this....Urgent Please
    Thanx for your time

    1.
    SQL> select n,n-mod(n,5) rnd from test;
             N        RND
          2020       2020
          2021       2020
          2022       2020
          2023       2020
          2024       2020
          2025       2025
          2026       2025
    2.
    SQL> select n,n+(case when mod(n,10) = 0 then 0
      2                   when mod(n,10) < 5 then 5-mod(n,5)
      3                   else 10-mod(n,10)
      4              end) rnd
      5  from test;
             N        RND
          2020       2020
          2021       2025
          2022       2025
          2023       2025
          2024       2025
          2025       2030
          2026       2030
    7 rows selected.
    3.
    SQL> select n,n+(case when mod(n,10) < 3 then mod(n,10)*-1
      2                   when mod(n,10) < 8 then 5-mod(n,10)
      3                   else 10-mod(n,10)
      4              end) rnd
      5  from test;
             N        RND
          2020       2020
          2021       2020
          2022       2020
          2023       2025
          2024       2025
          2025       2025
          2026       2025
          2027       2025
          2028       2030
          2029       2030
          2030       2030
    11 rows selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Round Trip problems with FCP, Motion and 16:9

    Hello all-
    I've been having some problems with FCP5 and Motion 2. I am working with anamorphic footage (mini dv), and my problem lies in trying to use the "send to" feature in FCP to Motion 2. If I send some footage to Motion 2, edit it, and then go back to FCP to look at my edit, the anamorphic flag has been removed... the video is squished and there are black bars on the right and left sides of the film. I can easily fix this if I find the clip in the FCP browser and check the anamorphic flag, then drag and drop that clip over the original in the sequence, but I was wondering if there was an easier way. Is there a way to make it be anamorphic when it comes back into FCP from Motion 2?
    Thanks!
    Dual 1.8 G5/2GB & 12 PB G4/1.25GB   Mac OS X (10.4.4)  

    Yes, it loses the anamorphic flag on round trip. Just
    ctrl/right-click on the Motion project in your
    timeline, select Properties/Format and click on the
    anamorphic setting column.
    Patrick
    Patrick-
    Thanks for the reply. That's exactly what I've been doing, but I was just wondering if this was an actual bug or not. I guess we will have to wait for Apple to fix it...
    BTW- Whenever I check the anamorphic culumn, I always have to re-drag and drop the clip in the timeline again. Is this right? Or should it go ahead and change it in the timeline automatically?
    Thanks again!
    Dual 1.8 G5/2GB & 12 PB G4/1.25GB   Mac OS X (10.4.4)  

  • HT4111 Logitech K810 UK layout problem with @ and " being the wrong way round.

    I have tried this keyboard on Windows 7 devices and they work just fine, but on IOS7, either the first version or the version released today, it remains the wrong way around - i.e. US spec.

    Hi,
    I have a problem with the same keyboard when I start up and hold the ALT key you can select a startup disk this is not working by my keyboard when I use a old keyboard I'ts working again do you have that problem also.
    Best regards Garry

  • Query help with round up of dates

    Hi,
    I have a problem with my query.
    I am calculating the difference between two dates and I want to get the hours.
    The problem is that I want the following to happen:
    if the difference is x such that x > 0 it should round it up to 1 (example: x = 0.1 it should be rounded up to 1)
    if the difference is y such that y >1 it should be rounded to 1 (example y = 1.05 it should be rounded up to 2)
    i have the following query at the momet:
    select to_char(arrivaldate,'DD/MM/YYYY hh24:mi:ss') as "ARRIVAL", to_char(departuredate,'DD/MM/YYYY hh24:mi:ss') as "DEPARTURE", round(trunc(mod((departuredate-arrivaldate)*24,24),2)) as duration from stay_log;
    thanks.

    Hi,
    Format your code so that the physical appearance of the code gives some hint as to what you're doing, as I did below.
    When posting code on this forum, always type &#123;code&#125; tags at the beginning and end of formatted sections.
    Do you mean that, instead of 21, you want to use the flightid from the main query?
    If so, that's called a "correllated query". The tables in the main query (and their columns) can be reference in the sub-query, like this:
    select     flightid                         as "FLIGHT",
              select     destairport_id
              from     journey,
                   flight
              where     flight.flightid  = stay_log.flight_id   -- correlated to main query
              and     flight.journeyid = journey.journeyid
         )                              AS "AIRPORT",
         to_char(arrivaldate,'DD/MM/YYYY hh24:mi:ss')     as "ARRIVAL",
         to_char(departuredate,'DD/MM/YYYY hh24:mi:ss')     as "DEPARTURE",
         ceil((departuredate-arrivaldate)*24)          as "DURATION",
         cost                              as "COST"
    from     stay_log;Often, people give a table alias to the main query table that is being referenced in the sub-query, as shown below.
    That's only required when the table name appears in both FROM-clauses.
    select     flightid                         as "FLIGHT",
              select     destairport_id
              from     journey,
                   flight
              where     flight.flightid  = s.flight_id     -- table alias s used here
              and     flight.journeyid = journey.journeyid
         )                              AS "AIRPORT",
         to_char(arrivaldate,'DD/MM/YYYY hh24:mi:ss')     as "ARRIVAL",
         to_char(departuredate,'DD/MM/YYYY hh24:mi:ss')     as "DEPARTURE",
         ceil((departuredate-arrivaldate)*24)          as "DURATION",
         cost                              as "COST"
    from     stay_log   s     -- table alias s defined here
    ;

Maybe you are looking for

  • Error Message when accessing songs

    Error Message: The song "1000 Miles" could not be used because the original file could not be found. Would you like to locate it? Yes or Cancel I recently lent my computer to a friend who wanted to copy some of my music from itunes. When i got my com

  • Configuration Error in PI 7.1 Receiver Agreement

    Hi, I am facing a problem while testing my interface throught RWB, I am getting below error. Error while sending message: com.sap.engine.interfaces.messaging.api.exception.ConfigException: ConfigException in XI protocol handler. Failed to determine a

  • Photoshop PDF wont open in Reader at Service Bureaus

    I have rasterized 6 illustrator files in Photoshop and saved as PDFs. They display fine on 3 computers at home in Reader. But when i go to kinkos or Alpha Graphics a blank page appears with an error message about a drawing problem when opened in Read

  • How can i get a burst of bubbles

    i'm making a bubble effect in particular i got the bubble file from the trapcode site now how can i get a burst burst of bubbles like 15 bubbles and give a 3 sec break and another burst of 15 bubbles the particular gives a continuous stream of bubble

  • Error in inserting data

    Hi, I have insert page i the developing instance it is working fine . But in production after click on submit we have a dialog page saying that do u want to save the data . If the user clicks ok the data is saving in backend but its showing the error