Confusion with the Log function

Hi all

I am facing a problem using the logarithmic function on oracle XE 11 g.

We all know that log (8), 2 is 3. Now obviously 3 should be together number here not a fraction (or I know wrong?).

However, I do this:

SELECT LOG(2,8) FROM DUAL;

     -- Result is 3

   -- but 
     SELECT floor(LOG(2,8)) FROM DUAL;  

    -- Result is 2 !!!!!!!!

  --   However 
     SELECT FLOOR(3) FROM DUAL;

     -- Result 3 as expected

DB Version is 11g XE.

Thank you,

Ru

1 * SELECT to_char (LOG (2.8)) FROM DUAL

SQL > /.

TO_CHAR (LOG (2.8))

----------------------------------------

2.99999999999999999999999999999999999999

SQL >

Tags: Database

Similar Questions

  • confusion with the analytical functions

    I created an example where I am right now with the help of analytical functions. However, I need the query below to return an additional column. I need to return the result from:-' factor_day_sales * max (sdus)'. Any ideas?

    If the first column is located and must have the following results

    777777, 5791, 10, 1.5, 15, 90, 135, 7050

    the 1350 is the result, I don't know how to do. (some how to multiply factored_day_sales max (sdus) 15 470 = 7050
    create table david_sales (
    pro_id number(38),
    salesidx number (38,6),
    tim_id number(38));
    
    truncate table david_sales
    
    create table david_compensations (
    pro_id number(38),
    tim_id number(38),
    factor number(38,6));
    
    
    insert into david_sales values
    (777777, 10.00, 5795);
    insert into david_sales values
    (777777,20.00, 5795);
    insert into david_sales values
    (777777, 30.00, 5794);
    insert into david_sales values
    (777777, 40.00, 5794);
    insert into david_sales values
    (777777, 100.00, 5793);
    insert into david_sales values
    (777777, 10.00, 5793);
    insert into david_sales values
    (777777,80.00, 5791);
    insert into david_sales values
    (777777, 10.00, 5791);
    
    insert into david_compensations values
    (777777, 5795, 1.5);
    insert into david_compensations values
    (777777, 5793, 2.0);
    insert into david_compensations values
    (777777, 5792, 1.0);
    insert into david_compensations values
    (777777, 5791, 1.5);
    
    
    
        SELECT  s.pro_id sales_pro
        ,       c.pro_id comp_pro
        ,       s.tim_id sales_tim
        ,       c.tim_id comp_tim
        ,       s.salesidx day_sales
        ,       NVL(c.factor, 1) factor
        ,       s.salesidx * NVL(c.factor, 1) factored_day_sales
        ,       sum(s.salesidx                   ) over (partition by s.pro_id order by s.pro_id, s.tim_id) Sdus
        ,       sum(s.salesidx * NVL(c.factor, 1)) over (partition by s.pro_id order by s.pro_id, s.tim_id) sumMjCj 
          FROM david_sales s
          ,    david_compensations c
          WHERE s.pro_id    = c.pro_id(+)
          AND s.tim_id      = c.tim_id(+)
          AND s.tim_id     BETWEEN 5791  AND 5795
    Thanks for looking

    Is that what you want?

        SELECT  s.pro_id sales_pro
        ,       c.pro_id comp_pro
        ,       s.tim_id sales_tim
        ,       c.tim_id comp_tim
        ,       s.salesidx day_sales
        ,       NVL(c.factor, 1) factor
        ,       s.salesidx * NVL(c.factor, 1) factored_day_sales
        ,       sum(s.salesidx                   ) over (partition by s.pro_id order by s.pro_id, s.tim_id) Sdus
        ,       sum(s.salesidx * NVL(c.factor, 1)) over (partition by s.pro_id order by s.pro_id, s.tim_id) sumMjCj
        , (s.salesidx * NVL(c.factor, 1) * sum(s.salesidx                   ) over (partition by s.pro_id order by s.pro_id, s.tim_id))
          FROM david_sales s
          ,    david_compensations c
          WHERE s.pro_id    = c.pro_id(+)
          AND s.tim_id      = c.tim_id(+)
          AND s.tim_id     BETWEEN 5791  AND 5795
    
    SALES_PRO              COMP_PRO               SALES_TIM              COMP_TIM               DAY_SALES              FACTOR                 FACTORED_DAY_SALES     SDUS                   SUMMJCJ                SUMMEDMULTI
    ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ----------------------
    777777                 777777                 5791                   5791                   80                     1.5                    120                    90                     135                    10800
    777777                 777777                 5791                   5791                   10                     1.5                    15                     90                     135                    1350  
    

    I get the 1350

    or did you mean:

        SELECT  s.pro_id sales_pro
        ,       c.pro_id comp_pro
        ,       s.tim_id sales_tim
        ,       c.tim_id comp_tim
        ,       s.salesidx day_sales
        ,       NVL(c.factor, 1) factor
        ,       s.salesidx * NVL(c.factor, 1) factored_day_sales
        ,       sum(s.salesidx                   ) over (partition by s.pro_id order by s.pro_id, s.tim_id) Sdus
        ,       sum(s.salesidx * NVL(c.factor, 1)) over (partition by s.pro_id order by s.pro_id, s.tim_id) sumMjCj
        ,  s.salesidx * NVL(c.factor, 1) * (sum(s.salesidx * NVL(c.factor, 1)) over (partition by s.pro_id order by s.pro_id, s.tim_id)) summedMulti
          FROM david_sales s
          ,    david_compensations c
          WHERE s.pro_id    = c.pro_id(+)
          AND s.tim_id      = c.tim_id(+)
          AND s.tim_id     BETWEEN 5791  AND 5795 
    
    SALES_PRO              COMP_PRO               SALES_TIM              COMP_TIM               DAY_SALES              FACTOR                 FACTORED_DAY_SALES     SDUS                   SUMMJCJ                SUMMEDMULTI
    777777                 777777                 5795                   5795                   10                     1.5                    15                     300                    470                    7050
    

    Note, in the second block, I changed it just to use sumMjCj instead of sDus which seems to correlate with what you wanted (15 * 470 = 7050) while sdus is 15 * 300 = 4500

    Published by: tanging on December 11, 2009 06:17

  • Satellite A100-220: is it possible to extend with the WLan functionality?

    As in the title: is it possible to extend the Satellite A100-220 - without builtin WLAN - with the WLAN functionality?

    Hello

    It is not a problem to use the WLAN option on the unit without internal WLAN card. You can also use the little USB WLAN stick. It is very small and easy to configure. Before you buy something to pick up the info from your local dealer.

  • How to find the number of data items in a file written with the ArryToFile function?

    I wrote a table of number in 2 groups of columns in a file using LabWindows/CVI ArrayToFile... Now, if I want to read the file with the FileToArray function so how do I know the number of items in the file. during the time of writing, I know how many elements array to write. But assume that I want the file to be read at a later time, then how to find the number of items in the file, so that I can read the exact number and present it. Thank you all

    Hello

    I start with the second question:

    bytes_read = ReadLine (file_handle, line_buffer, maximum_bytes);

    the second argument is the buffer to store the characters read, so it's an array of characters; It must be large enough to hold maximum_bytes the value NULL, if char [maximum_butes + 1]

    So, obviously the number of lines in your text tiles can be determined in a loop:

    Open the file

    lines = 0;

    While (ReadLine () > 0)

    {

    lines ++;

    }

    Close the file

  • Extremely confused with the extremely complicated presentation of BlackBerry applications

    Please help me, I'm very confused with the extremely complicated presentation of BlackBerry applications.

    I made an app, the name is "App", I got signed and downloaded the App using the emulator Ripple, with the word 'HelloWorld' signature (password not true of course).

    Now, I do another application, with the name of the App (B) I CAN'T use the same HelloWorld signature password because the emulator Ripple said "Oh, Snap!" Build request failed with the message: [ERROR] error: Code signing request failed because this version of the application or the package has been previously signed. If please increment the version (s) and try to connect again. »

    Now, I don't understand and I am EXTREMELY confused with the presentation of the model of application for Blackberry.

    I should first request, for an another RDK and COMINCO files create a new signature for App B password?

    Or should I just increment the bundle version? the problem is when I tried it on Blackberry server seems to give narrations of error message that the APP ID is already used.

    Okay, I'm officially stuck and I don't know what to do. Can any developer of blackberry here or the official employee blackberry tells me what I need to do?

    Thank you.

    I do not use ripple either but can see what the problem is (nothing to do with the ripple)

    Open your file config.xml for the new project (probably copied 'App A'?)

    In the widget section, change the id to something different, for example com.example.AppB

    Save - reload the ripple and make sure you have the new ID in the Config-> Widget

    All sorted

  • Problems with the Row_Number function

    I have problems with the Row_Number function. I use to assign line numbers to records where a student has a note of passage on a module and the exclusion of the modules failed (I want to show her a 0 as the line number for the modules failed). The problem is that when I try to use a condition, the report still assigns a line number to a defective module if it does not display it (it shows a 0 I wanted to show him). The results are displayed as follows:

    Line number Module Grade
    1ModuleAPass
    2ModuleBPass
    0ModuleCIn case of failure
    4 (instead of 3)ModuleDPass

    How can I make him jump to assign a line number to all the modules failed? Please help.

    Thank you.

    Thank you very much, Melanie. I made changes to query as per your suggestion, which is a union of the modules failed and passed (using row_number on success modules). Thanks for the solution.

  • Problem with the GetParameter() function in IScript

    Hello

    I am facing a problem with the GetParameter() function in IScript. I created a URL below and appellant IScript

    GenerateScriptContentURL ("EMPLOYEE", "MFC", Record.WEBLIB_REPT_SJ, Field.ISCRIPT1, "FieldFormula", "IScript_GetAttachment"). "? FileName =' | & AttachUserFileURL;

    before generating URLS, I'm just encrypt the name of the ZIP file & assignment in the variable string & AttachUserFileURL I concatenated in link above.

    and try to take the value encrypted text of decryption by %Request.GetParameter("FileName") in IScript who isn't able to get special characters such as +, is.

    Please get this.

    Thank you

    Edited by: 936729 may 25, 2012 03:35

    + and = are allowed in URLS. You just have to URL encode like this EncodeURLForQueryString(&AttachUserFileURL) before adding them to your URL:

    GenerateScriptContentURL("EMPLOYEE", "HRMS", Record.WEBLIB_REPT_SJ, Field.ISCRIPT1, "FieldFormula", "IScript_GetAttachment") | "?FileName=" | EncodeURLForQueryString(&AttachUserFileURL);
    

    Here is the entrance of PeopleBook for EncodeURLForQueryString:

    http://docs.Oracle.com/CD/E28394_01/pt852pbh1/Eng/psbooks/TPCL/htm/tpcl02.htm#_6453b1b1_1355ab71343__503e

  • Confusion with the implementation rate Comp

    I'm a bit confused with the implications of fixing the rate of the wrong frame.  My camera can record to 23.976 however the manufacturer sometimes mentions this parameter as 24 p in the manual.  I read that there is no harm using 24 p if the model is a bit long second.  But questions arrise if the model is longer and you are being followed.  On the other hand, mocha specifies that you be specific in the choice of your pace.  The difference.024 makes a real difference?

    If 24 fps is the standard film why camera makers made their record of cameras at 23.976, or film also just named its 24 p and 23.976.  23.976, 24, 25, 29.97, 30, 59,94, 60, they are all so close

    Also, what are the consequences of ripping out at a different pace

    Thanks in advance

    CS5.5

    If 24 fps is the standard film why camera makers made their record of cameras at 23.976, or film also just named its 24 p and 23.976.  23.976, 24, 25, 29.97, 30, 59,94, 60, they are all so close

    Also, what are the consequences of ripping out at a different pace

    Thanks in advance

    You can blame the TV standard NTSC color for the odd frame rate.  At the same time, it was really 30 frames per second.  These are the days of TV in black and white ONLY.  Engineers worked mightily to get to a color system that was compatible with existing B & W games millions, and they finally got it.  But to answer a color signal, they need a little bit more information in each image. The NTSC signal was already packed and needed something to give, so they slowed down the pace a bit.

    Thus, 30 images/s became 29.97... and in direct proportion, 24 fps is 23.976.  Just learn to live with it.

    "Yes, well how can you avoir.976 of an image?

    You can not.  But a frame does NOT miss a count of the number of frames in a second. It's really a MEASURE OF TIME.  PAL-Land, a frame is 1/25 of a second.  In Hollywood, a frame is 1/24 of a second.   In days of yore NTSC, a frame was 1/30 second.  But since 1953, 1/29.97 second.

    Don't obsess over 29.97 and 23.976.  Just use them and get used to them.  Do not put 29.97 images in a model of 30 fps, or 23.976 images in a model of 24 fps just because you like whole nice.  If you do, the movement of the images you shoot can go all twisted up.  Do not.  Do not.

    End of sermon.

  • confusion with the categories and types of backups

    Hello

    I started studying the RMAN and I'm getting a little confused with the backups... ask someone to clarify the following queries:

    1. HOT times and COLD backup strategies perform BACKUPSET BACKUP and COPY of the IMAGE?

    2 about the HOT water and COLD backup, are they only associated with the FULL backup?

    3. incremental backup are also HOT or COLD backup?

    4. incremental has 2 types: Cumilative and differentiated?


    I'm a bit confused with the above...

    Help, please.

    Concerning
    KK

    Whether HOT or COLD:
    BACKUP DATABASE will create BACKUPSETs

    (this default value can be overridden if you have set up the TYPE of DEVICE...) BACKUP TYPE to... where the backup type can be changed by default for the COPY.

    Whether HOT or COLD:
    DATABASE BACKUP AS COPY will create Copies of the Image

    An incremental backup can be a HOT or a COLD backup.

    Hemant K Collette

  • So confused with the export

    Hi everyone, I used FRAPS to record the gameplay of a certain video game and he did three different clips (the other continues where the previous clip ended). I want to change this in After Effects, but first, I need to do a video together. I thought that first Pro CS5 could do the job, but I'm confused with the sequence settings. It seems like everything I try only reduced the original clips for a video surrounded by a big black space. The clips are 840 x 524. I want to join the clips and then export it to the size of origin, but first Pro CS5 changes the size of the video. Help, please.

    You must establish a pre-defined sequence which corresponds to you source footage. If there is no one to begin with, choose office and there you can set almost all the parameters of the sequence. Which will remove the black borders.

    To work with FRAPS materials, there are several threads on the CS4 and prior to the forum. A search on "FRAPS" who should appear. Lots of good reading.

    Good luck

    Hunt

  • Confusion with the PF_Cmd_SEQUENCE_FLATTEN command.

    Hello

    I am very confused with the PF_Cmd_SEQUENCE_FLATTEN command. In literature, it is mentioned that it is sent when recording and duplication of a sequence. When I duplicate my custom effect FLATTEN is sent. But my confusion here is that this command is sent to the former effect which is reproduced or duplicated new effect?

    Think about what I'm doing. Please let me know where the explanation is not enough:

    I store an int value in the sequence data. And for each effect I continues to increment.

    1. I add a layer. Then I add 2 effects customized with data sequences 1 and 2 respectively.

    2. now duplicate the layer. PF_Cmd_SEQUENCE_FLATTEN command. I increment the sequence data. It is called twice for 2 custom effects. Data are 3 and 4 respectively for 2 new duplicate effects.

    But the problem is that now the effects in the first layer and the second layer, both have same sequence data. that is the 3 and 4 respectively and not 1, 2, 3 and 4.

    This can happen if the FLATTEN command is sent to the former effect prior to duplication. It's my guess that both the layer effects have updated IDs.

    Any ideas?

    Thank you

    Dheeraj.

    so...

    during the FALTTEN event records some data:

    I'm #3 on layerID 1024 in comp itemID 17 effect.

    during the commnad UNFLATTEN effect checks that it is.

    If there is effect on layerID #3 1024 17 itemID tabletop,

    He must say what the former effect.

    If data are different, it means that it is the new effect.

    It is possible that the UNFLATTEN commnad happenes before the effect has it's own effectRefH again.

    so you have to wait with this review the first call of updateParamsUI.

  • Frame using Vector with the trace function

    Hi all

    When I convert a raster to vector with the trace function, the result is excellent but I want to reduce the number of points, so I have less layers when I import it to the painter. Can anyone advise how to do?

    Rayne

    RayneMaker,

    You can select everything on every layer, Ctrl/CmdClicking on the names of layers, Ctrl / Cmd + A and Ctrl / Cmd + C to copy the whole and then open a new document, deselect the layers of dough remembers in the layers flyout and Ctrl / Cmd + F to insert a single layer.

    I'm still with 10, and there may be more easy/more smart solutions (in later versions).

  • I need a little help with the INSTR function

    Hello everyone,

    im still new to pl sql and experienced an issue with the INSTR function. I need to analyze some values of a CLOB containing the xml code and use INSTR to determine the beginning and end of the value, I would like to analyze.

    the data I need is in a <!-[CDATA [[Some Text]]]-> block. up to this point, I managed to take the start of the word, but I can't seem to capture the end of the CDATA block. I use this statement:

    POS: = INSTR (TO_CHAR (input_clob) [,'] ', pos2 + 6, 1);

    but it doesn't have the desired effect. [It seems to sort of go back to the length of the string, while the]-sign is actually in the xml file. my result would look to "Some Text]]--> < xmlxml >... < / xmlxml >...» ». [I tried to escape by writing ' \] "but if I do, the function returns zero and my parsed string is left blank.

    Unfortunately I can't use regular expressions, because I work with oracle 9.2i. Anyone know what I'm doing wrong?

    Thank you

    Edited by: user8719779 the 25.08.2009 02:23
    with my_tab as (select ''||chr(10)||
                           '  '||chr(10)||
                           '   '||chr(10)||
                           '  '||chr(10)||
                           '' col1 from dual)
    -- end of mimicking your data; USE SQL below:
    select substr(col1, instr(col1, '', 1, 1) - instr(col1, 'Hello

    I'm trying to use logged data from a source table in one of my interfaces in ODI. The problem is that one of the mappings on the columns target implies a function (sum) overall. When I run the interface, I get an error saying not "a group by expression. I checked the code and found that the columns jrn_subscriber, jrn_flag, and jrn_date are included in the select statement, but not in the group by statement (the statement group contains only remiaining two columns of the target table).

    Is there a way to get around this? I have to manually change the km? If so how would I go to do it?

    Also I'm using Oracle GoldenGate JKM (OGG oracle for oracle).

    Thanks and really appreciate the help

    Ajay

    "ORA-00979"when the CDC feature (logging) using ODI with Modules of knowledge including the aggregate SQL function works [ID 424344.1]
    Updated 11 March 2009 Type status MODERATE PROBLEM

    In this Document
    Symptoms
    Cause
    Solution
    Alternatives:

    This document is available to you through process of rapid visibility (RaV) of the Oracle's Support and therefore was not subject to an independent technical review.

    Applies to:
    Oracle Data Integrator - Version: 3.2.03.01
    This problem can occur on any platform.
    Symptoms
    After successfully testing UI integration ODI using a function of aggregation such as MIN, MAX, SUM, it is necessary to implement change using tables of Journalized Data Capture operations.

    However, during the execution of the integration Interface to retrieve only records from Journalized, has problems to step load module loading knowledge data and the following message appears in the log of ODI:

    ORA-00979: not a GROUP BY expression
    Cause
    Using the two CDC - logging and functions of aggregation gives rise to complex problems.
    Solution

    Technically, there is a work around for this problem (see below).
    WARNING: Problem of engineers Oracle a severe cautioned that such a type of establishment may give results that are not what could be expected. This is related to how ODI logging is applied in the form of specific logging tables. In this case, the aggregate function works only on the subset that is stored (referenced) in the table of logging and on completeness of the Source table.

    We recommend that you avoid this type of integration set ups Interface.
    Alternatives:

    1. the problem is due to the JRN_ * missing columns in the clause of "group by" SQL generated.

    The work around is to duplicate the knowledge (LKM) loading Module and the clone, change step "Load Data" by editing the tab 'Source on command' and substituting the following statement:
    <%=odiRef.getGrpBy()%>

    with
    <%=odiRef.getGrpBy()%>
    <%if ((odiRef.getGrpBy().length() > 0) && (odiRef.getPop("HAS_JRN").equals("1"))) {%>
    JRN_FLAG, JRN_SUBSCRIBER, JRN_DATE
    <%}%>

    2. it is possible to develop two alternative solutions:

    (a) develop two separate and distinct integration Interfaces:

    * The first integration Interface loads the data into a temporary Table and specify aggregate functions to use in this initial integration Interface.
    * The second integration Interfaces uses the temporary Table as Source. Note that if you create the Table in the Interface, it is necessary to drag and drop Interface for integration into the Source Panel.

    (b) define the two connections to the database so that separate and distinct references to the Interface of two integration server Data Sources (one for the newspaper, one of the other Tables). In this case, the aggregate function will be executed on the schema of the Source.

    Display related information regarding
    Products

    * Middleware > Business Intelligence > Oracle Data Integrator (ODI) > Oracle Data Integrator

    Keywords
    ODI; AGGREGATE; ORACLE DATA INTEGRATOR; KNOWLEDGE MODULES; CDC; SUNOPSIS
    Errors
    ORA-979

    Please find above the content of the RTO.
    It should show you this if you search this ID in the Search Knowledge Base

    See you soon
    Sachin

  • Problem with the search function

    I use firefox 10 and I have a problem with the search feature. If the word that I will try to find begins with the capital letter I can't find with control function if I write the word only with small letters. a the opposite. For example, if the word is 'Letter' I can't find this word if I type 'letter' in the search bar

    Is the option 'Option match case' in the verified search bar? If so, uncheck it.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

Maybe you are looking for