Excel to Oracle / function formula

I have a column that contains the log entries. He can say anything, but somewhere in there, there will be an entry showing this:
"ID: 555555-" (a number).

I need to extract this number. In excel I used something like this:

= MID (D2, FIND ("": ", D2, FIND (" ID: ", D2, 1)) + 2, (FIND (" '-", D2, FIND (" ID: ", D2, 1)")-FIND ("": ", D2, FIND (" ID: ", D2, 1))) - 3).

What funtions would be best to achieve this?

BTW, instead of finding the info, I thought it might be easier to undress the rest of the info... I do not know.

Follow these steps:

(1) add another instance of the COLUMN in question.

2) click on the fx and enter this:

Table of CASES WHEN. COLUMN LIKE 'ID:555555-%' THEN RIGHT (picture. COLUMN, the LENGTH (the table. (COLUMN) - POSITION ('-' IN the table.) COLUMN)) ELSE NULL END

(3) add a filter on this new column "is not ZERO.

You will have a report with just the rows where the value of COLUMN begins with ID:555555.

Tags: Business Intelligence

Similar Questions

  • Failed to open oracle functions after R12 installation on windows 2008 64 bit

    Hi guys
    I installed oracle R12.1.1 on windows server 2008 R2 64-bit, then the application opens but all forms of oracle functions cannot open, the message appear frm-92101, I try the solutions in the net, but no effect and I get another windows which and this message appears when trying to open an another oracle functions
    ""
    program currently running on this computer is attempting to display a message, then
    title of the message:
    E:\oracle\VIS\apps\tech_st\10.1.3\appsutil\jdk\bin\java '-serv ".


    This problem come when a program is not completely compatible with windows
    ""
    This message when you start windows too, but the path of java inside files of oracle applications, please help me if oracle r12.1.1 compatible with win 2008 64 bit or not?

    I installed oracle R12.1.1 on windows server 2008 R2 64-bit, then the application opens but all forms of oracle functions cannot open, the message appear frm-92101, I try the solutions in the net, but no effect and I get another windows which and this message appears when trying to open an another oracle functions

    Direct installation of R12 on Windows 2008 64 bit is not supported. You install it on a Windows 32-bit operating system, and then migrate to Windows 64 - bit.

    Oracle E-Business Suite installation and upgrade version Notes 12 (12.1.1) for Microsoft Windows Server (32-bit) [ID 761567.1]
    Migration Oracle E-Business Suite R12 to Microsoft Windows Server 2008 R2 [ID 1188535.1]

    Thank you
    Hussein

  • Problem transfer of Excel to Oracle

    I have a question of transfer of data from Excel to Oracle.
    I believe that I have configured everything very well, I was able to connect to Excel and Oracle, could boning tables and everything. But when I try to load the data, one here of this error on the result set that I couldn't find a solution.
    Any suggestions are appreciated! I can give more if necessary.
    Thank you.


    Here is the error log:


    8000: null: java.sql.SQLException: ResultSet is closed
    java.sql.SQLException: ResultSet is closed
    at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(JdbcOdbcResultSet.java:6646)
    at sun.jdbc.odbc.JdbcOdbcResultSet.clearWarnings(JdbcOdbcResultSet.java:1765)
    at sun.jdbc.odbc.JdbcOdbcResultSet.close(JdbcOdbcResultSet.java:1468)
    at oracle.odi.runtime.agent.execution.sql.concurrent.FastJDBCRecordSet.close(FastJDBCRecordSet.java:124)
    at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:113)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:338)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:263)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:822)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    Hi Caio,

    This seems to be a bug in version 11g ODI. Look at the ODI Support document id: 1437526.1

    https://support.us.Oracle.com/OIP/faces/secure/km/DocumentDisplay.JSPX?ID=1437526.1

    He recommends that you apply the hotfix 12798243 to resolve this problem.

    Kind regards

    Harris

  • Download a data sheet excel using Oracle APEX 3.2

    Hi all

    Please help me out to download the data in the worksheet excel using oracle APEX 3.2.

    Follow the steps mentioned in the link below, but even after I get a error saying no data found

    http://avdeo.com/2008/05/21/uploading-Excel-sheet-using-Oracle-Application-Express-apex/


    Please help me to go further.

    Kind regards
    Santini

    Hello

    Try the Jarola.

    See: import data in Excel to database table

  • The HTML that is returned by an Oracle function...

    What is the best way to view the HTML code that is returned by an Oracle function (Apex 3.2.1.00.10)?

    I tried in many ways...

    I don't want to have a visible, but even when I do that, the first returned row Editor:

    < b > text < /b >

    It shows in "BOLD", but for some reason, it escapes from the second < \b > and the fact like that "& lt;" \b & gt; "so it's show < \b > and everything is"BOLD"...

    tward wrote:
    What is the best way to view the HTML code that is returned by an Oracle function (Apex 3.2.1.00.10)?

    I tried in many ways...

    I don't want to have a visible, but even when I do that, the first returned row Editor:

    a text

    It shows in "BOLD", but for some reason, it escapes from the second <\b>and done like this '< \b >"so he showed <\b>and everything is"BOLD"...

    you have the backslash "close tag"... it should be
    < b > text < /b >

    Note the slash!

  • Conversion in Oracle function.

    Hello

    So here's the scenario I have. I was wondering if there is any oracle function provides or is it possible that I could achieve this goal.
    CREATE OR REPLACE procedure TestA 
    (
          partnumber               IN  number,
          partsubnum               IN  varchar2,
          errstring             OUT varchar2
    ) as
    
    --  Declare local variables
    
    ll_inputpartnum varchar2(100);
    
    
    Begin
    
        ll_inputpartnum := partnumber || partsubnum; -- Concatinate partnumber and partsubnum
      -- Will need to convert this variable to number.
    
        TestB.Process(ll_inputpartnum,parameter2, s_errstring, errnum); --ll_inputpartnum must be of type number 
         if  errnum <> compkg.success then
           errstring := s_errstring;
           return;
         end if;
      
      
    Exception 
        When others then 
        Null;    
    End;
    /
    I don't have the ability to change anything about how to TestB.Process.

    There are therefore two problem I am trying to solve in this scenario.

    First, the input parameter - ll_inputpartnum in TestB.Process takes input of only of number type. So I need to convert somehow the concatenated in full ll_inputpartnum.

    Second problem, procedure TestB.Process - after completing his treatment, goes from ll_inputpartnum to the third procedure. Let's say TestC procedure. TestC procedure, so I need to break in again value concatenated in original partnumber and partsubnum.

    The value concatenated - ll_inputpartnum does not change through this process.

    So, I'm trying to understand the best way to approach this situation.

    Thank you

    Published by: Ramses on May 25, 2010 13:18

    with a function like (using also the package of William)

    function combine_parts(p_partnum in integer,p_partsubnum in varchar2) return integer is
      l_length pls_integer := 5;  /* adjust to the maximum possible length of partsubnum */
      hex_val  varchar2(5) := '';
    begin
      if length(p_partsubnum) > l_length then
        return 0;
      end if;
      for i in 1 .. l_length loop
        hex_val := hex_val || to_base(ascii(substr(lpad(p_partsubnum,l_length,chr(0)),i,1)),16)
      end loop;
      return p_partnum * power(256,l_length) + to_decimal(hex_val,16);
    end;
    

    You can simply

    ll_inputpartnum := combine_parts(partnum,partsubnum);
    

    and finally, the parameter ll_inputpartnum can be connected to the appropriate process
    you will need another function to find partnum and partsubnum in another process, because it will be just ll_inputpartnum

    function concatenated_parts(p_number in integer,p_separator in varchar2 default '|') return varchar2 is
      l_length pls_integer := 5;  /* adjust to the maximum possible length of partsubnum */
      hex_val  varchar2(5);
      chr_val  varchar2(5) := '';
      l_partnum integer;
    begin
      l_partnum := trunc(p_number / power(256,l_length));
      hex_val := to_base(p_number - l_partnum * power(256,l_length),16);
      if length(hex_val) > l_length then
        return '';
      end if;
      for i in 1 .. l_length loop
        chr_val := chr_val || chr(to_decimal(substr(hex_val,i,1),16));
      end loop;
      return to_char(l_partnum) || p_separator || chr_val;
    end;
    

    Concerning

    Etbin

    p.s. features are not tested (no database home)

  • Excel to oracle

    Hello world

    I am trying to export data from excel to oracle.

    Topology Manager
    I managed to do the physical schema and the logical schema.

    the connection in the scheme worked with odbc.

    Designer.

    the model recognized my diagram logical and all worked fine.

    I did the data to store and defined as varchar columns, as we do in the flat file.

    I'm not able to see the data, iam getting the error. "the query execution failed."

    Thank you



    When you use an Excel file, must be defined a "name of the interval" which ODI will understand that the 'table '.

    To do this, Excel Select the entire data, right click and choose 'The interval name' (in Excel 2007).

    Save and close.

    If all is well spent, you will be able to see the 'picture' of ' Reverse selective "on your model. (check the 'objects to reverse' option)

    Make sense to you?

  • Export spreadsheet Numbers to Excel removes the functions

    I opened an Excel file with numbers 3.6.1.  It works fine; all my data and my imported correctly formulas and

    the spreadsheet works fine.  However, when I then export the document in Excel, the data appear in the result

    Excellent document, but the cells where the results of the calculations on these data are all empty.  It's as if the functions are lost in the

    export.

    When you open an Excel worksheet in Numbers v3.6.1, so is no longer an Excel worksheet. It is translated in the format of the internal document numbers and is subject to the behavior and functions programmed in numbers. When you export to Excel, another translation occurs, and if you have applied the features unique to a number, it will be deleted, or mutilated in the process of exporting to Excel.

    If you share Excel spreadsheets with Windows users, then there will be less of a problem in using Office 2016 for Mac, when you open, edit and save in the native architecture of Microsoft Excel document. No translation. No surprises.

  • function formula and percentage of power

    Hello

    I need to create this kind of report and does not know how to get the formula for the annual.

    Total countCancelledRestRetention rate90 daysAnnualAnnual renewal
    127 3205 390124 86795,28%4.7%17.6%82.4%
    128 4504 890124 58995,23%4.8%17.7%82.3%

    In MS excel, the formula for the annual is = 1-(retention rate) ^ 4 and the result is a percentage.

    All are correct except for annual renewal and annualized data.

    I get no response percentage so instead of the figure above, I'm 82415038.70 (for example no. 1 above) of the query below.

    Can someone please? Thank you very much

    
    
    
    

    Select c.prod, sc.total_count, count (c.id) as cancelled,

    SC.total_count - count (c.id) as rest,

    Round ((sc.total_count - count (c.id)) sc.total_count * 100.2) as Retention_Rate,

    round (100-((sc.total_count - count (c.id)) sc.total_count * 100), 2) as "90 days."

    (round ((100-((sc.total_count - count (c.id)) sc.total_count * 100)), 2)) * 4 as annual.

    round (100-(100-((sc.total_count - count (c.id)) sc.total_count * 100)) * 4, 2) as Annualized_Renewal

    Customer c,.

    (select count (id) as total_count, client prod)

    where start_delivery < = sysdate

    and paid_until > = sysdate

    and cancellation_date > = sysdate

    and cancellation_code =' '

    Group of prod

    ) sc

    where c.cancellation_date between & < name = "Date" default = ' 01/01/2013' type = ' date' >

    and & < name = "Date up to the" default = ' 31/03/2013' type = 'date' >

    and c.prod = sc.prod

    C.prod group, sc.total_count

    I think that there are not a lot of space for improvement of this query.

    Like Chris mentioned the exponential function in SQL is POWER.

    However, in excel the percentage value is always be between 0 and 1. As 0.83. And this value is then switched on.

    From the mathematical point of view, it's the value you need to use (0.83 ^ 4 instead of 83 ^ 4)...

    But lets start at your request. You select twice in the customers table. This is not necessary and is simply your slow query.

    Here is an approach to circumevent that and other issues.

    As I don't have your customer table, I can not really test that. But try to follow step by step and adapt it to your needs.

    Step 1 - create a query with countdown and canceled the County.

    not tested

       select count(case when sysdate between start_delivery and paid_until
                         and cancellation_date>=sysdate
                         and cancellation_code=' '
                    then 1 end ) as total_count
             ,count(case when c.cancellation_date between :date_from and :date_until
                    then 1 end ) as cancelled
             ,prod
       from customer
       group by prod;
    

    Step 2 - use the previous query and add the retention and the annualized rate

    with cust as (
       select count(case when sysdate between start_delivery and paid_until
                         and cancellation_date>=sysdate
                         and cancellation_code=' '
                    then 1 end ) as total_count
             ,count(case when c.cancellation_date between :date_from and :date_until
                    then 1 end ) as cancelled
             ,prod
       from customer
       group by prod
       )
    select prod, total_count, cancelled
              ,total_count - cancelled as remaining
              ,1 -(cancelled / total_count ) as retention_rate
              ,power(1 -(cancelled / total_count ),4) as annualized_rate
    from cust;
    

    Step 3 - format the output

    with cust as (
       select count(case when sysdate between start_delivery and paid_until
                         and cancellation_date>=sysdate
                         and cancellation_code=' '
                    then 1 end ) as total_count
             ,count(case when c.cancellation_date between :date_from and :date_until
                    then 1 end ) as cancelled
             ,prod
       from customer
       group by prod
       )
       , cust_ret as
       (select prod, total_count, cancelled
              ,total_count - cancelled as remaining
              ,1 -(cancelled / total_count ) as retention_rate
              ,power(1 -(cancelled / total_count ),4) as annualized_rate
         from cust)
    select prod
         , total_count
         , cancelled
         , remaining
         , round(retention_rate * 100,2) as ret_rate_percent
         , round(1-(retention_rate * 100),1) as ninety_days
         , round(1-(annualized_rate * 100),1) as annual
         , round(annualized_rate * 100,2) as annual_rate_perc
    from cust_ret;
    
  • DB2 code: today's date and the day to ORACLE function?

    Please help me to convert this code oracle...

    DB2 code:

    [code] ((Current date) - day (date (current date))) [/ code]

    I tried to use the functions of default in PL date timestamps, but it won't work. Help, please.

    As told by BluShadow and rp0428, you can execute the following statement:

    Select current_date, trunc(current_date,'MM')-1 day of double;

    The output will be today's date and the month last, last day.

  • UNIX_TIMESTAMP and FROM_UNIXTIME from MySQL to ORACLE functions

    Hi all

    I'm migrating some functions and stored procedures in MySQL to ORACLE, and I the next instruction

    Set valuedat = FROM_UNIXTIME (valor + UNIX_TIMESTAMP ('2000-1-01 00:00:00 '));

    Since MySQL.

    Look, I found that:

    UNIX_TIMESTAMP ('2000-1-01 00:00:00 ')

    can be equivalent to the following query:

    SELECT (to_date (January 1, 2000 "," MON-DD-YYYY')-to_date('01-jan-1970','DD-MON-YYYY')) * (86400) as dt FROM dual;

    but testing the numbers is not the same

    Please can someone help me!

    Specifically, I need to know how to build the equivalent in oracle for FROM_UNIXTIME and UNIX_TIMESTAMP functions

    Thank you and best regards!

    CRGM

    Hello

    These are functions that I built to solve the original requirement, thanks for all your comments.

    ************************************************************************************************************************************

    CREATE OR REPLACE FUNCTION FROM_UNIXTIME

    (

    TIMESTAMP_ NUMBER

    ) AS OF DATE OF RETURN

    NUMBER OF SECONDS_PER_DAY: = 86400;

    MASK (50 CHAR) VARCHAR2: = 'DD-Mon-YYYY HH24:MI:SS ";

    DATE OF REF_DATE;

    BEGIN

    REF_DATE: = TO_DATE ('01 - ENE - 1970 00:00:00 ', MASK);

    RETURN REF_DATE + (TIMESTAMP_/SECONDS_PER_DAY);

    END FROM_UNIXTIME;

    **********************************************************************************************************************************

    CREATE OR REPLACE FUNCTION UNIX_TIMESTAMP

    (

    DATE_ IN DATE

    ) RETURN AS NUMBER

    NUMBER OF SECONDS_PER_DAY: = 86400;

    NUMBER OF DIFF_BETWEEN_DATES;

    MASK (50 CHAR) VARCHAR2: = 'DD-Mon-YYYY HH24:MI:SS ";

    DATE OF REF_DATE;

    BEGIN

    REF_DATE: = TO_DATE ('01 - ENE - 1970 00:00:00 ', MASK);

    DIFF_BETWEEN_DATES: = TO_DATE (TO_CHAR (SYS_EXTRACT_UTC (DATE_), MASK), MASK)

    -REF_DATE;

    RETURN DIFF_BETWEEN_DATES * SECONDS_PER_DAY;

    END UNIX_TIMESTAMP;

    ******************************************************************************************************************************

    Concerning

  • Oracle function

    Hi all

    I know it would be a very basic question but need some clarification.

    In oracle, we use the function, what is the meaning of return type because by using the output parameter, we can also return the value.

    Thank you

    Hello

    Ask yourself "why do we need to use function values?  Why can't we always use THE arguments instead? »

    One of the reasons is that functions with arguments OUT cannot be called from SQL, the SQL statements used in PL/SQL statements.

    Another is the convenience of use of multiple functions in a single statement.  With function values, you can do things like

    SUPERIOR (SUBSTR (LTRIM (str), 1, 4))

    Using only THE values, would need you 3 separate instructions for it; one for each function.

  • Oracle function to retrieve the records randomly

    I need function to select a random DB folder.

    For example, we have 500 records and an input to the function value is 5 ways, it must display the records randomly between 1 to 5

    Thank you

    Question is not clear, I thought that Oracle has always returned entries in random order... Do you expect the number of records between 1 & 5?

    Kind regards

  • How to connect Microsoft excel to oracle database?

    version Oracle 11.2.0.3
    version of solaris 10 operating system
    Microsoft excel 2007

    any body can help me how to connect excel, oracle database, I can write my query in excel, and retrieve data from oracle database and show in excel sheet or I can write a query to insert data to the oracle database.

    Hello

    I never tried, but why not try so if you succeeded you will come to know otherwise you would need still oracle client to connect to the oracle database that is located on the other server or if you do not have to install on your local machine that you cannot connect to the oracle database oracle client.

  • Query regarding oracle functions

    Hi all

    I tried to work with decode them and output of NVL to get the following:

    Output value
    1 NULL
    0 1
    1 1
    2 2
    3 3


    to do this, I wrote the following query:
    SELECT DECODE (NVL(high_value,1), 0.1, NVL(high_value,1)) in tab1.

    Can there be a replacement of this using other functions?

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Solaris: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    Thank you
    Nikhil

    Can be with decoding

    with t_data as
    (
    select null as val from dual union all
    select 0 from dual union all
    select 1 from dual union all
    select 2 from dual union all
    select 3 from dual
    )
    SELECT
         val,decode(val,null,1,0,1, val) output
    from t_data
    

Maybe you are looking for

  • How to remove a mail out of my thunderbird account

    I have my set Thinderbird in place so I can manage multiple e-mail accounts. I want to delete one of these e-mail accounts that no longer exists on the wide screen of thunderbird. How can I do this?

  • Dial-up on laptop NB - 100 connection

    Hello. I bought the toshiba nb-100 portable. I want to connect to my dial-up through my phone line connection, but it said no modem...There are even only the ethernet port and port on phone to the laptop line. Please help me how to get out. Thank you

  • F6C42PA #ACJ: 10 Upgrade from Windows 8.1 Windows

    Hello! I'm currentlt using HP Pavilion 15 (Nr F6C42PA #ACJ). It came with windows 8.1 and has a 4th gen processor Haswell 4200. I read somewhere on the support Web site of HP laptops with processors Haswell would not be able to upgrade to win 10 usin

  • What is wifi ASUS?

    Setting up my new MacBook Pro. For many years, for internet, I depended on my computer Internet hotspot for my phone data. At some point, I hit ASUS instead of my phone in wifi computer section, and it is connected. (Of course, my phone was already t

  • Cartridge printer error message HP Office Jet 3600 series

    Original title - HP printer Office Jet 3600 series I had a paper jam. I cleared the jam and now I am getting a cartridge error message and I keep out cartridges and put back them, but the error message still cant clear. How can I clear this error and