How to extract data using substring & Instring

Hello

I have data like

a_76488b_2780c

a_76488b_2780c_

a_76488b_c2780

a_76488b_c2780

a_31487b_5542

a_76488b_2780

I want to extract data such as the last 4 digits digital only

2780

2780

2780

2780

5542

2780

Without regexp? It depends on your comments... If you know a definitive character set you want to replace, and then you can go for:

(strictly dependent on your entry in the question)

SELECT TRANSLATE)

SUBSTR (RTRIM (str, '_'), INSTR (RTRIM (str, '_'), '_',-1) + 1);

'~c_',' ')

Str

T;

See you soon,.

Manik.

Tags: Database

Similar Questions

  • How to extract data using bluetooth other device...

    Hi all

    First, I describe my problem:

    I want an application that extract the xml data in ECG device using bluetooth after accessing this data make some calculation and send it to the server... I am able to serach all the device compatible bluetooth after that, I am also able to connect from the particular device... (Now I use bluetooth Simple device as phone, pc or anything which is Bluetooth)

    Now the problem is... After connection of the device, I want to go get a (for example an image or text document.) file of the device connected using my camera...

    can anyone know how to extract data or file to another device that is currently associated with my camera... using BlackBerry device...

    Please help me to overcome this problem...

    Currently, I am working with Blackberry.6

    As suggested, I would recommend you try the samples provided.

  • How to extract data using PL/SQL

    Hello
    I'm new to XMl, I just need to extract the id, type, the number from below because of the xml data. Any help will be much appreciated.

    < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:i24n = "http://www.w3.org/2005/09/ws-i24n" xmlns:typ = "http://oracle.com/determinations/server/10.3/rulebase/assess/types" >
    < SOAP - ENV:Envelope >
    < SOAP - ENV:Header >
    < i24n:international >
    en_US < i24n: local > < / i24n: local >
    < i24n:tz > GMT-0700 < / i24n:tz >
    < / i24n:international >
    < / SOAP - ENV:Header >
    < SOAP - ENV:Body >
    < type: assessment / response >
    < type: global instance >
    < typ:attribute id = "myfee" type = "currency" >
    < typ:number - 6.0 > out < / typ:number - out >
    < / typ:attribute >
    < typ:entity id = "entity_fee" >
    < typ:instance id = "8899776" >
    < typ:attribute id = "mycost" type = "currency" deducted = "true" >
    < typ:number - 108.0 > out < / typ:number - out >
    < / typ:attribute >
    < typ:attribute id = "myplace" type = "text" >
    < typ:text - out > K < / typ:text - out >
    < / typ:attribute >
    < typ:attribute id = "myroll" type = "text" >
    < typ:text - out > NNA < / typ:text - out >
    < / typ:attribute >
    < / typ:instance >
    < / typ:entity >
    < / typ: global instance >
    < / typ: assess / answer >
    < / SOAP - ENV:Body >
    < / SOAP - ENV:Envelope >

    Thank you

    Mhand

    Works for me.

    If you want to retrieve the attributes at different levels, use a descendant axis:

    SQL> with t as(
      2  select xmltype(
      3  '
      6  
      7  
      8  en_US
      9  GMT-0700
     10  
     11  
     12  
     13  
     14  
     15  
     16  100.0
     17  
     18  
     19  
     20  
     21  16.0
     22  
     23  
     24  D
     25  
     26  
     27  
     28  
     29  
     30  
     31  ') col
     32  from dual)
     33  select x.*
     34  from t,
     35       xmltable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV",
     36                                'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ")
     37       , 'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/descendant::typ:attribute'
     38         passing t.col
     39         columns
     40           id_1 varchar2(100) path '@id',
     41           type_1 varchar2(100) path '@type',
     42           val varchar2(100) path 'typ:number-val'
     43       ) x
     44  ;
    
    ID_1                     TYPE_1        VAL
    ------------------------ ------------- ----------
    Currency_type            dollar        100.0
    currency_fee             dollar        16.0
    currency_v_type          USD
     
    
  • How to extract data using the xml data type

    Hello
    I tried the following example using the xml data type, but not the desired output.
    could you please correct the query in order to obtain the necessary
    CREATE TABLE TEST.EMP_DETAIL
    (
      EMPNO       NUMBER,
      ENAME       VARCHAR2(32 BYTE),
      EMPDETAILS  SYS.XMLTYPE
    )
    Insert into EMP_DETAIL
       (EMPNO, ENAME, EMPDETAILS)
     Values
       (7, 'Martin', XMLTYPE('<Dept>
      <Emp Empid="1">
        <EmpName>Kevin</EmpName>
        <Empno>50</Empno>
        <DOJ>20092008</DOJ>
        <Grade>E3</Grade>
        <Sal>3000</Sal>
      </Emp>
      <Emp Empid="2">
        <EmpName>Coster</EmpName>
        <Empno>60</Empno>
        <DOJ>01092008</DOJ>
        <Grade>E1</Grade>
        <Sal>1000</Sal>
      </Emp>
      <Emp Empid="3">
        <EmpName>Samuel</EmpName>
        <Empno>70</Empno>
        <DOJ>10052008</DOJ>
        <Grade>E2</Grade>
        <Sal>2530</Sal>
      </Emp>
      <Emp Empid="4">
        <EmpName>Dev</EmpName>
        <Empno>80</Empno>
        <DOJ>10032007</DOJ>
        <Grade>E2</Grade>
        <Sal>1200</Sal>
      </Emp>
    </Dept>
    '));
    I need to get the record for Empid = '2'
    Then tried the following query with no expected o/p
    SELECT a.empno,a.ename,a.empdetails.extract('//Dept/Emp/EmpName/text()').getStringVal() AS "EmpNAME",
         a.empdetails.extract('//Dept/Emp/Empno/text()').getStringVal() AS "EMPNumber",
          a.empdetails.extract('//Dept/Emp/DOJ/text()').getStringVal() AS "DOJ",
          a.empdetails.extract('//Dept/Emp/Grade/text()').getStringVal() AS "Grade",
          a.empdetails.extract('//Dept/Emp/Sal/text()').getStringVal() AS "Salary",
          a.empdetails.extract('//Dept/Emp[@Empid="2"]').getStringVal() AS "ID",
          a.empdetails.extract('//Dept/Emp[EmpName="Coster"]').getStringVal() AS "CHK"
         FROM emp_detail a 
         where empno=7  
               AND a.empdetails.existsNode('//Dept/Emp[@Empid="2"]') =1
    Thank you...

    Karthick_Arp wrote:
    I'm not very good at that... But if your XML code should not be more like this

    SQL> Insert into EMP_DETAIL
    2     (EMPNO, ENAME, EMPDETAILS)
    3   Values
    4     (7, 'Martin', XMLTYPE('
    5    
    6      1
    7      Kevin
    8      50
    9      20092008
    10      E3
    11      3000
    12    
    .. cut ..
    

    Why? It is perfectly valid to data as attributes rather than elements and also quite common for key values.

  • How to extract data from a signed pdf that was sent to me.

    I can extract data from a PDF file that is not signed, but how to extract data from a signed PDF? Exporting data option does not work once it is signed. Specifically, I want to combine the data into a csv file, but a PDF signed does not to me.

    Hi evanb92625060,

    It is not possible to extract (using Acrobat |) Collection and management of the PDF to form data) data from a signed PDF form is that it locks all fields in the form.

    Kind regards
    Nicos

  • How to extract data from SQL server in the FDM

    Hi Experts

    How to extract data from a SQL server HFM to another SQL Server using scripts for integration in FDQM?

    concerning

    Dev

    Could you clarify why you want to do this?

    If you try to synchronize two databases (apps) to have a backup or something running in a development environment, I suggest configuring replication between two databases. It would be much more effective to do it at the SQL Server level through the application of FDM, IMHO.

    Charles

  • How to extract data from SAP and COBOL using ODI

    Hi people,

    Can you please let me know the procedures in ODI to extract data from SAP and COBOL?

    Thank you all for the help.

    Hello

    You can download the Patch 8571830 to Oracle metalink.

    It has a new technology 'SAP ABAP' and KMs to extract and load data-
    RKM SAP ERP and SAP to Oracle ERP LKM.

    Thank you

  • How to upgrade data using load data page?

    Hi all

    im doing a migration page where my user will provide the csv file, so I could load into my table. problem is that loading data using apex collection so I know columns are limited, but I forgot how. (probably 40 something).

    So I decided to split the csv file with the two files with a common column, which is a key. If im guessing two files can be linked using this key. However when I upload the second file, he will still do an insert instead of update action. How updated? is this what I need to set or activate?

    just to check that I tried to download the csv... and then changed some content inside and re upload... even if I that.it always inserts instead of update. Can anyone share how can I update? It's really important because I have a lot of columns to download. so in my situation, the best way is to separate files.

    Help, please...

    In components, under the loading of data shared. On the model of your table, you specify the unique columns (up to 3). I believe that if there is no match, it will insert. If it finds a matching record, it will update. So if you have a single column that is in each worksheet, you must specify here

  • How to extract data from waveform

    I have prepared a VI for acquisition and analysis. I have data from NI 9203 manuplate (power source). I have to use a lot of channels and more than 1 sample of a channel so Daqmx read vi out of waveform module and it is not a choice for table 1 d. How can I this form to scale data and display 2 diffferent scale given in a graphic waveform?

    The DAQmx Read returns an array of waveforms.  Each waveform is t0, dt, Y components and optional attributes.  See the palette of waveform for tools to extract the components and build waveforms.

    To make your scaling that you do these things:

    1. Select the waveform you want to scale by using the Index table or index of waveform Array.vi.

    2. download the component Y of the selected waveform.

    3. resize it if Y' = m * Y = b, where is the original painting and the Y' is the matrix to scale.  You can use the standard digital functions for * and + because they work for arrays and scalars.

    4 build a new waveform using Y'.

    Lynn

  • How to recover data using regexp_like

    Hi all

    I have to use the function regexp_like on our books, please let me know how to use in this situation.below is sample data.
     id        Name          department
     1         A                3~2~1
     2         B                14~10~3
     3         C                 22~7~6
     4         D                 4~5~9
    If I pass the Department number 2 result shows id 1
    14-> id 2 are coming.
    22-> id 3.

    Kind regards
    Rajasekhar

    Published by: SuNRiZz68 on April 27, 2009 07:30

    Hello
    Just add: WHERE INSTR ('~ ' | Department |) '~', '~' || : by | '~') > 0;

    Cordially Salim

    SQL> var par varchar2(20)
    SQL> exec :par:='1';
    
    Procédure PL/SQL terminée avec succès.
    
    SQL> WITH t AS
      2       (SELECT 1 ID, 'A' NAME, '3~2~1' department
      3          FROM DUAL
      4        UNION ALL
      5        SELECT 2, 'B', '14~10~3'
      6          FROM DUAL
      7        UNION ALL
      8        SELECT 3, 'C', '22~7~6'
      9          FROM DUAL
     10        UNION ALL
     11        SELECT 4, 'D', '4~5~9'
     12          FROM DUAL)
     13  SELECT *
     14    FROM t
     15   WHERE INSTR ('~' || department || '~', '~' || :par || '~') > 0;
    
            ID N DEPARTM
    ---------- - -------
             1 A 3~2~1
    
    SQL> exec :par:='22'
    
    Procédure PL/SQL terminée avec succès.
    
    SQL> WITH t AS
      2       (SELECT 1 ID, 'A' NAME, '3~2~1' department
      3          FROM DUAL
      4        UNION ALL
      5        SELECT 2, 'B', '14~10~3'
      6          FROM DUAL
      7        UNION ALL
      8        SELECT 3, 'C', '22~7~6'
      9          FROM DUAL
     10        UNION ALL
     11        SELECT 4, 'D', '4~5~9'
     12          FROM DUAL)
     13  SELECT *
     14    FROM t
     15   WHERE INSTR ('~' || department || '~', '~' || :par || '~') > 0;
    
            ID N DEPARTM
    ---------- - -------
             3 C 22~7~6
    
    SQL> 
    
  • How to extract data from an arbitrary xml file and export it to a CSV friendly?

    Hallo,
    I am facing big problems in the use of XML files. I have a
    application that generates XML files with clusters containing arrays
    and scalars as in the example pasted below. My task is to
    Read it and export the data into a CSV document readable by a human.
    Since I do not know the actual content of the cluster, I need some sort
    Smart VI through the XML looking for berries
    and other data structures for export properly in the CSV file
    format (columns with headers).
    Thank you



    3


    6


    0



    1



    2



    3



    4



    5




    3.14159265358979



    Ciao

    Rather than to get the

    node, you can just go directly to the node since ' one that really interests you. Basically what it means to determine the elements of table how much you have, and it depends on if you have 1 or 2 knots . The rest is just of the child nodes and the next siblings. See attachment as a starting point. The attached XML file is a table 2D (change the .xml extension).

    Notes on the example:

    • I did not close properly references, so it's something you need to do.
    • It is limited to tables 1 d or 2D.
    • I suggest using a control path of the file to specify the input XML file and path of the file/folder control to specify the location of the output file.

  • How to extract data from cluster of component-level?

    I use the harmonic Analyzer function to read the cluster of component-level, which cotain for channel 0 and 1 data

    But having problem with playing on the basic component for each channel (part of the table 1). Pleas help.

    Thank you

    Yes! What I need is a function of the index before using of unbundling by name to extract the desired data. THX

  • How to extract data from digital 1 d or 2D waveforms in a table or excel file?

    Hi all

    My DAQ gives me data in the form of a table 1 d or 2D-waverform digital time.

    How to export the data in an excel file or copy it into a table?

    Hi Prasanth,

    Some options come to mind:

    -pass the DAQmxRead to give you fair DBL tables instead of waveforms

    -use a conversion like this:

    -use functions of PDM, they accept waveforms...

  • How to record data using a while loop?

    Hello

    I created a .vi I try to use to record several channels of data. I have implemented the user must be able to record data until the "STOP" button is pressed, then the data is saved in a spreadsheet file.

    Question No. 1: How to allow the user to store an indefinite amount of data?

    If you run the .vi as is, you will see that you are only able to collect 100 points, and registration takes place during Ms. I want to collect about 5 minutes worth of data and have a sampling frequency of 1 kHz.                 Any suggestions?

    Question 2: How can I change the worksheet file extension? Let's say I want than to save it as a .csv file?

    Thanks in advance for any pointers or suggestions!

    I have not looked at your code, but only based on your description I would implement a producer/consumer to save your data.  You must acquire your data in a loop (the producer) and send to your loop of logging (the consumer) using a queue.  Yes, you must save the data, then that is acquired.  In this way, you do not have to worry about storage who knows how much data in RAM.  It's just the disk as soon as he can.

    You can save the file with whatever the desired extension.  If you want it to be a CSV file, then do the extension a .csv.

  • Using substr / instr to analyze a filepath help

    I can't parse a string by saying using sql. I have a full path column. The files are similar to:

    C:\Users\Guest\Pictures\example.jp

    I want to be ablt to simply enter the name of the image file. I worked on several variants of a query by using the function substr and instr function. I came up with the following query. FILEPATH is the name of the column. So far, it gives me the file name, but has the '-' in front of it. Can someone help me get rid of this. Thanks in advance.

    Select substr(FILEPATH, (instr(FILEPATH,'\',-1,1)))
    from Table_Name
    where ID = '101'
    
    

    Hello

    Here's one way:

    SELECT SUBSTR (FilePath

    INSTR (FilePath

    , '\'

    -1

    ) T

    ) + 1 + 1 in the end note

    ) AS file_name_only

    Table_Name FROM

    ID WHERE = '101'

    ;

    SUBSTR (str, p) returns the last part of the string str, starting at position p.  You place the position of the last '-' p; That's why the ' \' was added.  If you add 1 backwards, like this:

    SUBSTR (str, p + 1) then you're going to be in the way of the position of the character after the last 1 '-'.

Maybe you are looking for

  • Example of car iPad/Android data dashboard

    Some time ago there was a piece of information or something similar which showed a car UI on a Tablet (iPad/Android) using the LabVIEW data dashboard. Someone know where I can find this item? Can't find out more.

  • Acer Aspire One d270 ram upgrade

    I recently bought a netbook Acer Aspire One D270-1806. It comes with 1 GB of Ram. I'm looking for this move to 2 GB. I could not find a service manual for this netbook. Can someone point me in the right direction?

  • Effects of camera of Smartphones blackBerry Bold 9900

    Hello Will there be an option in the settings of the Bold 9900 camera to take pictures in black and white? I see that the 'scenes' but nothing comparable to the effects. Thank you.

  • BlackBerry smartphones can not edit sent messaged

    I am forwarding a message. before emailing, I'm editing it but can't do anything. How to delete, for example, certain words or the sender of the message? Maybe there are any application able to help me on this?

  • Magenta in my Yellow - OfficeJet Pro K8600

    Why are there of Magenta in my yellow and Cyan in my Magenta? I turned off all photo "patches" in preferences, set the printer to manage manually in the driver and removed color profiles of colors so that the Adobe software could manage the color.