How to extract the string values

Hello

Database: 11.2.0.3.0

I have a JSON string like below. I want to extract only the propetyvalues. Can you help me with the query:

{

'documents':]

{

'document':]

{

'propertyname': 'Id',

'propertyvalue': "{1C236CB2-AB97-4982-8117-DE0BE6D7DB46}".

}

]

},

{

'document':]

{

'propertyname': 'Id',

'propertyvalue': "{1318AC90-C321-4D3D-9558-6547EFE49A7E}".

}

]

}

]

}

Hello

Too bad, that you do not have version 12. Then, you can use the function JSON_VALUE mentioned previously.

Here's something you can do in your version:

SELECT LEVEL AS n

, REGEXP_SUBSTR (: str)

, ' "propertyvalue": "([^"]*) "

1

LEVEL

NULL

1

) AS propertyvalue

OF the double

CONNECT BY LEVEL<= regexp_count="" (:str,="">

;

If you want to know that adapts to your specific problem, post CREATE TABLE and INSERT statements for some sample data and the exact results you want from these sample data.

Tags: Database

Similar Questions

  • How to limit the string value?

    How to limit a string must be a value of a group of parts. For example, a string must be one of the following values: abc defg h, ijklm

    Is there any method of the JAVA API on how to limit a string value?

    No - you will need to add the necessary code to the method "set" and make the instance of private variable so that the "setter" is used.

  • How to extract the string

    I know that I did it in before CVI...

    Only, I don't remember how I did it...

    (braindead today?!?)

    Here goes:

    Take a string:

    "Mary had a little lamb".

    FindPattern "little."

    resulting string: "" Mary had a lamb.

    What I have works to find the model and it is place.

    -sigh-

    I know I'll get because from what I remember, this is a very simple solution... I can't just think of him...

    And I vaguely remember the name of the function that I used...

    R

    You could try something like this:

  • Replace the string value of table

    with cte as)

    Select val '123', 'abwec' double val1

    Union of all the

    Select "456" val, "mowerw" double val1

    Union of all the

    Select val '709', 'wkwere' double val1

    Union of all the

    Select val '078', 'awerwewerwreq' double val1

    )

    Select * from cte;

    -incoming string

    "asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..."

    need to replace like 'abwec' 123 and 456 as "mowerw" and 709 as wkwere and 078 as 'awerwewerwreq '.

    How to replace the string value of the string

    I'm going to the table which will have mapping information I need to see the incoming string and replace the appropriate value of the val to val1

    something like

    Of

    "asdasd123456werwer@asdwer709@ewrwerewrwqqwezxder078ewrwer@87w8eopiu @..."

    TO

    "asdasdabwecewrwer@87w8eopiumowerwwerwer@asdwerwkwere@ewrwerewrwqqwezxderawerwewerwreq@..."

    By using the TYPE clause.

    with cte as

    (

    Select val '123', 'abwec' double val1

    Union of all the

    Select "456" val, "mowerw" double val1

    Union of all the

    Select val '709', 'wkwere' double val1

    Union of all the

    Select val '078', 'awerwewerwreq' double val1

    ),

    input_tbl

    as

    (

    Select "asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..." input_str

    of the double

    )

    Select max (input_str) Dungeon (first order by desc NWR dense_rank) input_str

    de)

    Select rno, input_str

    de)

    Select rownum NWR

    val

    val1

    input_str

    count (*) over() cnt

    from cte

    Cross

    Join input_tbl

    )

    model

    dimension (NWR)

    measures (val, val1, cnt, CAST (input_str AS VARCHAR2 (4000)) input_str)

    (

    input_str [any] = replace (nvl (input_str [cv () - 1], input_str [cv ()]), val [cv ()], val1 [cv ()])

    )

    )

  • XMLTABLE - how to extract the value of the escape of a node as-is sequence

    Hello

    How can I me XMLTABLE leave the string value of a node like the version with escape sequence, rather than unescaping it?

    E.g.:
    select extract(xmltype('<root><test>&lt;unset&gt;</test></root>'), '/root/test/text()').getstringval() col1 from dual
    union all
    select col1
    from   xmltable('/root' passing xmltype('<root><test>&lt;unset&gt;</test></root>')
                    columns
                    col1 varchar2(20) path 'test');
    
    COL1                                                                            
    ---------------------
    &lt;unset&gt;                                                                   
    <unset>     
    NB. you will need to hit rΘpondre α and then quote my post to see the actual text; For the life of me, I can't get the forum properly displays things. In short, the string returned by the EXTRACT is escaped, while the XMLTABLE chain is unescaped.


    ETA: I looked through the standards xml from the list of available functions, and nothing seems relevant. {noformat} * scratches head * {noformat}

    Published by: Boneist on March 19, 2013 14:11

    You can emulate what do I EXTRACT / getStringVal () by projecting the node text() as XMLType and type-casting to VARCHAR2 in the SELECT clause:

    SQL> set scan off
    SQL>
    SQL> select cast(col1 as varchar2(20))
      2  from xmltable(
      3         '/root'
      4         passing xmltype('<unset>')
      5           columns col1 xmltype path 'test/text()'
      6       ) ;
    
    CAST(COL1ASVARCHAR2(20))
    ------------------------
    <unset>
     
    
  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

    http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/

  • How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Mr President.

    How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Concerning

    For the date, you can use groovy expression adf.currentDate to set the current date. reference http://adfgouravtkiet.blogspot.in/2012/11/how-to-set-default-values-for-entity.html

    You already have ways to use the sequence.

    How do you add a new value in the form. You're creating a new line of your page (user interface) and by engaging with validation operation? Unless you commit you will not be able to see anything in the table.

    Thank you

  • How to extract the values of XMLTYPE column,

    SQL > create table temporary global xmtype_tab (xmlfile xmltype);

    SQL > select * from all_directories;

    SYS RESTOREDIR/home / / dbimptask /.

    insert into xmtype_tab values (xmltype (dbms_xslprocessor.read2clob ('RESTOREDIR ','LAS_SETUP.xml ')));

    1 line of creation.

    SQL > select * from xmtype_tab;

    XMLFILE
    --------------------------------------------------------------------------------
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >


    How to extract the values inside each tag?


    XML file has the following data...


    rowset <>
    < ROW >
    < DATA_CAPTURE_ON > 1 < / DATA_CAPTURE_ON >
    < > 9600 BAUD_RATE < / BAUD_RATE >
    < ACK_TIMEOUT > 1 < / ACK_TIMEOUT >
    < TUBE_TRAVEL_LIMIT > 4 < / TUBE_TRAVEL_LIMIT >
    < SEND_SID_TIMEOUT > 1 < / SEND_SID_TIMEOUT >
    < INDEX_Q_TIMEOUT > 2 < / INDEX_Q_TIMEOUT >
    < HW_HANDSHAKING > 1 < / HW_HANDSHAKING >
    < / ROW >
    < / LINES > ';

    I use the Oracle 10.2.0.3 version...

    Why does this work?

    You are missing the tag of the ROWSET:

    select extractvalue (xmlfile, '/ROWSET/ROW/BAUD_RATE') baud_rate
      from xmltype_tab
     where existsnode (xmlfile, '/ROWSET/ROW/BAUD_RATE') = 1;
    
  • Put the string value in a table

    Hello

    Probably an easy question, but I am reading data of a RFID reader that returns a string value of 12 bytes. Whenever a RFID reads, I want the tag to be inserted in a string table on the front panel. So, basically, a newspaper of the each tag [read-> Insert row 0] then [read-> Insert level 1] and so on. I work RFID reader, I don't know how to put the string in the table.

    I'm not sure of the steps necessary to achieve control of the table (or if the table control is the right thing to use).

    Any help would be greatly appreciated. Thank you.


  • Need urgent help! In my Vision Application, how to extract the parameters of the geometric model specified curve was generated by the template editor OR?

    I have an application of machine vision, in which the geometric pattern match technique was used to find the target in the images of type variant.

    as we know, we do a geometric model by model OR editor in the editor we can adjust the parameters of the curve specified settings to get the desired curves and we derive the custom box to ignore during the match. then we save the use of the same model in our application of vision.

    Now my question is coming. When I program my request for the geometric game. I have specified the parameters of the curve for the entrance of the IMAQ Advanced Setup learn ringtone 2, of course, I have to adjust this identical to the model, but I don't know how we extract the geometric model. I tried all the methods, for example, I can read data custom, IMAQ get characteristics of the geometric model(it's just for the basic functionality? so is there even a VI based edge?), even at anasys PNG file formats! But I can't read the info of the geometric model by myself!

    It is also illogical to adjust the CURVE SETTINGS manually again for the " IMAQ Advanced Setup Learn Pattern 2" after that I already have in the template editor OR!

    Hello

    Why do you need to specify the curve settings once again, if you have already built a model using the template editor? You don't need to use "IMAQ Advanced Setup learn geometric model 2 VI" to find games (see the attached example).

    You can wire the 'curve settings' control to 'IMAQ configuration geometrical game model 2 VI', but the values are not used if wire you a Boolean true to the node "use learning curve settings" (it's like that by default). To prove it, I enclose a small program with pre-created model (using the template editor) for a geometrical alignment. The model and the test of three images are also included.

    Try changing the settings of the curve with the 'use know curve settings' enabled, and you will see the corresponding score remains the same. Disable the Boolean control, then try to change the curve settings.

    Also take a look at the detailed help for "IMAQ configuration geometrical game model 2 VI", specifically the "learning curve parameters of use."

    I hope this helps.

    Best regards

    K

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • Extract the string from the chain - separator = ' | '?

    Hi people!

    I want to know how to extract the a string with delimiter = XE field ' |'.

    For example:
    String = "field1 |" Field2 |... | fieldX |... | filedn | »

    I want to extract fieldX.

    Thanks for your help, regards.

    Use the functions like this substr and instr

    substr(string, instr( string,'|', 1, xth_occurrence)+1, instr( string,'|', 1,xth_occurrence+1) - instr(string,'|', 1, xth_occurrence))
    

    Luca

    Please, mark the reply as useful/correct if it is

    Published by: Luka on January 26, 2010 10:42

    Published by: Luka on January 26, 2010 10:42

  • How to extract the signal from the waveform of my power level designated?

    Hi all

    How can I extract the signal of the waveform accroding to the power level? I read the Trigger & Gate .vi, but this vi retrieves the signal duration. I want to extract the signal depending on the power level.

    As shown in the following figures, the signal I want to deal with is between 130000 to 140000, if I Zoom, I can see the useful signal is between 135400 to 138200. The question is how to extract the signal in the area?

    I tried the sub_NoiseEst_And_Chop_Shell.vi in the example of Packet_based_link also, but this Subvi seems to be a bit slow. Can someone give me the best advice? Thanks in advance!

    I'm working on something similar, but have not had time to fully develop.

    My idea was to use an envelope detector (low pass filter) and then use a detection of energy VI on the envelope.

    Here is where I left

  • How to get the updated values of the loops while they are running

    Hello

    I am trouble with a very basic problem, how to access the updated values of the "loop FOR" during operation?  Basically, the VI I is currently working on two sub vis calls each sub VI has a loop for, and the two screws may or may not work for the same number of iterations. My goal is to read the values in each terminal within the loop of two sub VIs, in primary VI. I tried to do this using Global Variables, but in main VI it will display only the last iteration of the two value sub live. Could someone please tell me whrere I go wrong? Is there any other/better way to do this.

    I appreciate any input on this issue.  

    Pass a reference of the main VI control to the Sub screws.  See attached example.

  • Analyzes the string and extract the string delimiter

    Hello

    Basic questions.  Is this possible with the scan of regular expression of the string to extract the string that are in the specified delimiters.  Here is an example:

    Name of the \\Name of the folder 1\Name to the folder 2\Name to the folder 3\File

    Chain analysis can produce the following by specifying the regular expression on the right:

    1 folder name

    Name of the folder 2

    Name of the folder 3

    File name

    I tried \\\%s\\%s\\%s\\%s but the %s stops on the first white space.

    Thank you

    Michel

    RavensFan suggested the service appropriate for your condition, but you can also use an alternative, which is "spreadsheet of array of strings.

Maybe you are looking for

  • AirPort Extreme can disappear from the network

    I have an airport Time Capsule 802.11ac 3 TB, implemented as my router, connected to a cable modem Comcast.  I also three units AirPort Extreme 802.11ac connected via an Ethernet cable and configure in Bridge mode.  The settings were all made with Ap

  • Stopped reached log - logging file size limit

    From time to time, quite often, a pop-up box appears on my screen and said: limit size of logfile reaches - logging stopped. I can only press the "Accept" button or close it, but it rises a little later. I have not found information on the web.

  • Envy 17 6CF5093KZJ: dedicated video memory

    My laptop has Intel Graphics HD 4600. Total available graphics memory is 8285 MB with only 128 MB dedicated video memory. Is it possible to increase the amount of memory dedicated to the video memory? Edit: If it is not possible to do it with a few k

  • Equium L10-273 kept switching between battery and power

    Hello I saw a similar post here and I was wondering if anyone could tell me if they have had this problem sorted? My Equium L10-273 kept switching between battery and power all others second, which made it impossible to type, it's got worse and worse

  • Can I install the operating system of Windows XP on HP dv6324us?

    Hello I bought the HP dv6324us laptop computer in 2006-32 bit. Window Vista family premium is the OS installed. I would like to format and install OS Windows XP on it. I need drivers that support Windows XP for HP dv6324us laptop. Please can someone