Extract the given string a String between double quotes

Hey guys,.

I am doing a project open source to help lovers of ADS - B to store data on Oracle Database XE (11.2.0.2)

I need to retrieve a string, but I didn't know how, please can someone help me.

Chain: [{'id': 'PR - GIG', 'label': "PR-CONCERT - E47EB2 - BS Airlines - Boeing 737 - 73 S (29077)", "value": 'PR - GIG' "}]

KeyString: "label".

Output: ' PR-CONCERT - E47EB2 - BS Airlines - Boeing 737 - 73 S (29077) '


And if possible put this string in multiple strings

String1: PR-GIG

Channel 2: E47EB2

String3: BS Airlines

String4: Boeing 737 - 73 S

String5: 29077

Thanks for the help.

Select x.*

t,.

XMLTable)

"ora: tokenize($s,"-").

from regexp_substr (str,'"label": "([^"]+) "', 1,1,null, 1) as"s ".

) x

/

COLUMN_VALUE
-------------------------
PR - GIG
E47EB2
BS Airlines
Boeing 737 - 73S (29077)

SQL >

SY.

Tags: Database

Similar Questions

  • Limit the Total number of characters between double Quotes using Oracle 11 g PL/SQL

    Hello

    I need a way to apply a limit of 32 substring for each group of data inside double quotes, with Oracle 11 g PL/SQL.

    Essentially using the following example string that much for me, I have no control of how this string is built:

    str := "AAAAAAA BBBBBBB CCCCCCC DDDDDD1","AAAAAAA BBBBBBB CCCCCCC DDDD",”QWERTY”,”N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1”’;

    I need to go through each group of values between each double quote, for example ("QWERTY") and apply a substring of 32 to each group found.

    So, using the example above of the chain, it's as if I need to do the following:

    str := "substr(‘AAAAAAA BBBBBBB CCCCCCC DDDDDD1’,1,32)","substr(‘AAAAAAA BBBBBBB CCCCCCC DDDD’,1,32)",”substr(‘QWERTY’,1,32)”,”substr(‘N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1’,1,32)”’;

    So in the end, my final result for the str would be composed of four groups where the length of each grouping is less than or equal to 32.

    Any help would be great.

    Thank you.

    Try this (replace with your actual table):

    with the temp as

    (

    SELECT substr (REGEXP_SUBSTR (str,'[^,] +', 1, LEVEL) 1, 32) r

    OF THE TEST

    connect IN REGEXP_SUBSTR(str, '[^,]+', 1, LEVEL) IS NOT NULL

    )

    Select replace (listagg (r, '"," ') in the Group (order by null),' ' "','" ' ")

    temp

    output:

    "VIEN BBBBBBB CASTILLO DDDD", "VIEN BBBBBBB CASTILLO DDDDDD1", "N1N1N1N1N1N1N1N1N1N1N1N1N1N1N1N", "QWERTY".

  • Filter % symbol in the given string

    Hi friends,

    I want to delete the '%' symbol in the given string and load it into another table.

    For example:
    ========

    If the string is "% hgjkdhdfj % djsfhsjk % hjkghf % fdjhjhfsjh"... In this example, I want to delete all the '%' symbol and load into another table... Query will be relevant to the entire...

    Someone help me please...


    Kind regards
    Williams.

    I'm not quite clear on your condition... you are looking for:

    SQL> select replace ('fdjhjhfsjh%hgjkdhdfj%djsfhsjk%hjkghf%', '%')
      2    from dual
      3  /
    
    REPLACE('FDJHJHFSJH%HGJKDHDFJ%DJS
    ---------------------------------
    fdjhjhfsjhhgjkdhdfjdjsfhsjkhjkghf
    
  • Regular expression, replace all commas between double quotes ONLY

    Hello

    I want to remove all commas between double quotes:

    I tried under model, but it does not replace all if we have more than one comma in double quotes.

    SELECT REGEXP_REPLACE (123, "45.6" Hello, "John, Mike, Marc", 456, "-Anne, Anna"', ' "([^"]*),([^"]*)" ', '"\1;\2" ', 1, 0) suite

    FROM DUAL;

    Result

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

    123, '45; 6"," Hello, "John, Mike;" "Marc", 456, "Anne-; Anna.

    the first comma between 'John, Mike; Marc"is not replaced...

    Recursion can do if you insist on the SQL solution

    with

    correct (INP, orig, CNT, res, Step) as

    (select str,

    substr(STR,2),

    -case when substr (str, 1, 1) = ""' then 1 else 0 end,

    substr (STR, 1, 1),

    1

    of (select 123, '45.6,' Hello, ' John, Mike, Marc ", 456, '-Anne, Anna', 'single_value' ' str of union double all the)

    Select "123456789" across double Union

    Select ' ""' of all the double union

    Select "" 123,456,789"" Union double all the

    Choose 123, '45.6,' Hello, ' John, Mike, Marc ", 456, 'Ann-Marie, Anna', 'unique value' ' double str

    )

    Union of all the

    Select the inp

    substr(orig,2),

    CNT + case when substr (orig, 1, 1) = ""' then 1 else 0 end,

    RES | cases where substr (orig, 1, 1) = ','

    so to case when mod(cnt,2) = 1

    then ' ~'

    else «»

    end

    of another substr (orig, 1, 1)

    end,

    Step + 1

    Rectifier

    where orig is not null

    )

    Select the inp, res

    Rectifier

    where the orig is null

    INP RES
    "" ""
    123456789 123456789
    "123456789". "123 ~ 456 ~ 789".
    123, '45.6' Hello, ' John, Mike, Marc ", 456, '-Anne, Anna', 'single_value '. "123," "45 ~ 6 ', Hello," John ~ Mike ~ Marc ", 456," Anne-~ Anna ',' single_value '.
    123, '45.6' Hello, ' John, Mike, Marc ", 456,"Ann-Marie, Anna","unique value ". "123," "45 ~ 6 ', Hello," John ~ Mike ~ ~ ~ Marc ', 456,' Anne-Marie ~ Anna "," unique value ".

    Concerning

    Etbin

  • Find the alteast a number and a character in the given string

    Hi all

    How to find the given input string, it contains at least one alpha and one number.
    My test like this data

    test123-> pass
    test-> Fail
    123Test-pass
    123 > fail

    select * from dual where regexp_like ('test123','[0-9]')

    If it closes your questions, so please mark the thread as an answer.

  • How to sqlldr, i.e. load data between double quotes?

    How to load/sqlldr double quota data? What should be the control look like file?

    DOWNLOAD THE DATA
    INFILE *.
    Add
    IN THE ROUTE_TIME TABLE
    FIELDS ENDED BY ',' OPTIONALLY ENCLOSED "" "
    TRAILING NULLCOLS
    (BLADE_ID TANK NULLIF (BLADE_ID = WHITE),
    ROUTE_CODE TANK NULLIF (ROUTE_CODE = WHITE),
    STARTTIME TANK NULLIF (STARTTIME = WHITES),
    ENDTIME TANK NULLIF (ENDTIME = WHITES),
    ROUTE_CODE_DAY1 TANK NULLIF (ROUTE_CODE_DAY1 = WHITE),
    ROUTE_CODE_DAY2 TANK NULLIF (ROUTE_CODE_DAY2 = WHITE),
    ROUTE_CODE_DAY3 TANK NULLIF (ROUTE_CODE_DAY3 = WHITE),
    ROUTE_CODE_DAY4 TANK NULLIF (ROUTE_CODE_DAY4 = WHITE),
    ROUTE_CODE_DAY5 TANK NULLIF (ROUTE_CODE_DAY5 = WHITE),
    ROUTE_CODE_DAY6 TANK NULLIF (ROUTE_CODE_DAY6 = WHITE),
    ROUTE_CODE_DAY7 TANK NULLIF (ROUTE_CODE_DAY7 = WHITE),
    ACTIVE_DATE DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (ACTIVE_DATE = WHITE).
    TERMINATE_DATE DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (TERMINATE_DATE = WHITE).
    CREATE_ON DATE "YYYY-MM-DD HH24:MI:SS" NULLIF (CREATE_ON = WHITE).
    CREATE_BY TANK NULLIF (CREATE_BY = BLANKS))
    begindata
    'BLADE_001', 'A_TOP_DEST',' 00:00:00 ',' 00:30:00 ', 'ALEGWD10P0A', 'ALEGWD10P0A', 'ALEGWD10P0A', 'ALEGWD10P0A', 'ALEGWD10P0A', 'ALEGSA10P0A', 'ALEGSU10P0A', ' 01-SEP-2007 00:00:00 "," "," 01-SEP-2007 13:10:35 "," SYSTEM ".

    Of course the above is false, could just a tell me what is the problem.

    I talked about http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96652/ch05.htm#1005624, but I'm not able to interpret the syntax correctly.

    Thank you

    The format mask 'MM-DD-YYYY HH24:MI:SS' does not match with the data "01-SEP-2007 00:00:00.

  • Avoid writing empty lines or remove the empty string between data lines

    Hello

    I have this problem...  I write as a 4 x 4 witch table comes from a graph of intensity in a file. But when I write, regardless of the method that I use out it somehow unusable when I try to read more later.

    Right now I got change for a 1 x 16 table witch I later convert back to 4 x 4 again shown in the graph of the intensity.

    The problem is that I have empty lines between the data I want to remove to display correctly.

    Maybe to be clear in my explanation I will post screenshots of how I write and how I like to read...

    Can someone help me?

    Thank you!

    Antonio

    Why do you use a loop to create a string to write to the file? In LabVIEW 8.x writing on a spreadsheet file is polymorphic, so you can select the instance of 'Double' and simply connect your table 2D directly to it, without a loop or anything like that. On playback, even select the instance 'Double' for your return values exactly as you wrote them.

  • extract the partial string of the string in oracle

    Hello friends,

    I have a string like this

    var str = "/ G/CNH/CNHCornerstone/currentCode/data/Working/Images/ModelImages/png/7402203E-607D-E111-9CA5-005056875BD6.png"

    I want to extract only 7402203E-607D-E111-9CA5-005056875BD6 of the chain.

    Please let me know how to implement this...

    Thank you/kumar

    Published by: kumar73 on April 10, 2012 12:34

    One more using REGEXP_SUBSTR... This should be faster (than the previous REGEXP) because the REGULAR expression is simpler and extracts only the GUID.

    select regexp_substr('/G/CNH/CNHCornerstone/currentCode/data/Working/Images/ModelImages/png/7402203E-607D-E111-9CA5-005056875BD6.png', '[0-9A-F]{8,8}-[0-9A-F]{4,4}-[0-9A-F]{4,4}-[0-9A-F]{4,4}-[0-9A-F]{12,12}') from dual

    You need however to reference that. In addition, it assumes that only the file name is a GUID. If a drectory name is a GUID, then he will find out who "accidentally" instead.

    Published by: dayneo on June 6, 2012 07:35

  • Find the exact match from the given string

    Hi friends,

    I have a string separated by commas parent ' asdf, 1234, Vanessa, rtu, 123'.

    If the string to find is "1234", the query should return 'Y' (as '1234' had an exact match).

    If the string to find is '12', the query should return "n" (for '12' has no exact match).

    If the string to find is "12345", the query should return "n" (since '12345' has no exact match).

    If the string to find '123', then the query must return 'Y' (from '123' has an exact match).

    If the string to find is "124", the query should return "n" (since "124" has no exact match).

    The string to find will not have a comma.

    I tried with INSTR, REGEXP, REPLACE logical BI-BOUTEILLE. It does not work. Please help me.

    Not sure exactly what you want or what are your intentions of PL/SQL, but it can help you!

    SQL > ed

    A written file afiedt.buf

    1 declare

    2 v_parent_str VARCHAR2 (200): ='asdf, 1234, Vanessa, rtu, 123';

    3 v_src_str1 VARCHAR2 (50): = '123';

    4 v_src_str2 VARCHAR2 (50): = '12';

    5 v_src_str3 VARCHAR2 (50): = '1234';

    6 v_src_str4 VARCHAR2 (50): = '12345'.

    7 - my varriables is declared.

    8 I PLS_INTEGER;

    9 str VARCHAR2 (100);

    tab 10 sys.dbms_utility.uncl_array;

    11 start

    12 str: = "" ' | " REPLACE (v_parent_str, ",", "",""). '"';

    13 sys.dbms_utility.comma_to_table (str, i, tab);

    14 d in 1.5 in loop

    15. If TRANSLATE (tab (j) "," has "', 'A') (v_src_str2, v_src_str3, v_src_str1, v_src_str4) then

    16 dbms_output.put_line (TRANSLATE (tab (j) "," has "', 'A') |') -exist");

    17 end if;

    18 end of loop;

    19 * end;

    20.

    1234 is

    123 exists

    PL/SQL procedure successfully completed.

    SQL >

    If you need something else, then please clearly describe the requirement.

  • Replace the string, each value should double quotes around it

    How can I replace this basic string with double quotes around each value?

    dog, cat, john, mark

    I would like to:

    'dog', 'cat', 'john', 'brand '.

    Thank you

    -weStsIdE

    Hello

    I answered my own question. Well nice for someone else. The function ListQualify will insert what you need before and after each element of individual list.

    Actually powerful enough that you can just insert double quotation marks, for example around channels and leave intact numeric values.

    -weStSidE

  • 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 response JSON data

    Hi all

    I get the following response from the server.

    "
    "PAO - ENV ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1 =" urn: soapservice "container ="http://www.w3.org/2001/XMLSchema"xmlns: xsi ="http://www.w3.org/2001/XMLS
    "Chema-instance" xmlnsPAO - ENC = "http://schemas.xmlsoap.org/soap/encoding/" SOAP - ENV:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/" > ""<>
    tAdvertismentReturn xsi: type = "xsd: String" > {'MSG1': '1', "MSG2": "success", "DA..."}

    Now, I want to create a QVariantList using JsonDataAccess.

    If I manually extract the JSON string after that

    downloadData = jda.loadFromBuffer (data);

    so I'm able to get the data.

    Without extraction like that how can I take the response JSON data?

    Thank you.

    Thanks for your time,

    Here's my problem how to build a soap with the response object.

    I solved this problem with the help of the example of the weather.

    Thank you.

  • REGEXP_REPLACE remove the comma in double quotes

    Hello

    I am trying to remove the comma of a string in double quotes, currently I can only remove a comma using under sql

    SELECT REGEXP_REPLACE (' "" A, B, C, def "', '(") ([^ "|,"] +) (,) ([^ ""] +) ("") ',' \1\2 \4\5' ') FROM DUAL;

    output: 'A B, C, def'

    But I need the form "A B C def".

    Hello

    Jarkko Turpeinen wrote:

    ... I think that I stop to answer here, because I don't understand of course questions

    Very understandable.  If my assumption is correct, the question would be much clearer if OP gave an example that included a few commas inside the quotation marks and some outside, as in the example below.

    Here's a way to implement what I have described in the answer #2 above:

    VARIABLE input_txt VARCHAR2 (100)

    EXEC: input_txt: = 1, '2', ' A, B, C, def ", 3" foo, bar '4 ';

    WITH got_parts AS

    (

    SELECT LEVEL AS part_num

    , REGEXP_SUBSTR (: input_txt)

    , '[^"]*("|$)'

    1

    LEVEL

    ) AS part_txt

    OF the double

    CONNECT BY LEVEL<= 1="" +="" regexp_count="" (="">

    , '"'

    )

    )

    SELECT LISTAGG (CASE

    WHEN MOD (part_num, 2) = 0

    THEN REPLACE (part_txt, ',')

    Of OTHER part_txt

    END

    ) Within AS output_txt GROUP (ORDER BY part_num)

    OF got_parts

    ;

  • Regular expression help please. (extraction of a subset of the string between two markers)

    I haven't used regular expressions before, and I can't find a regular expression to extract a subset of the string between two markers.

    The chain;

    Stuff of header I want
    Stuff of header I want
    Stuff of header I want

    Stuff of header I want
    Stuff of header I want
    Stuff of header I want

    6 ERRORS
                         
    Info I want to line 1
    Info I want line 2
    Info I want line 3
    Info I want to line 4
    Info I want to line 5
    Info I want line 6
    END_ERRORS

    From the string above (it is read from a text file), I try to extract the subset of string between ERRORS 6 and END_ERRORS. The number of errors (6 in this case) can be any number from 1 to 32, and the number of lines I want to extract will correspond with this number. I can provide this number of a caller VI if necessary.

    My current solution, which works, but is not very elegant;

    (1) using Match Regular Expression for the return of the string after you have synchronized the 6 ERRORS

    (2) uses the Regular Expression matches to return all characters before game END_ERRORS of the string returned by (1)

    Is there a way this can be accomplished using 1 Regular Expression Match? If so someone could suggest how, as well as an explanation of the work of the given regular expression.

    Thank you very much

    Alan

    I used a character class to catch any word or whitespace characters.  This put inside parentheses a substring matching the criteria that you can get by developing the node for regular expression matching.  The \d matches the numbers and the two * s repetition of the previous term.  So, \d* will find the '6', as well as "123456".

  • I'm trying to extract the strings and load them into a text-helpplease file

    I'm trying to extract the strings and load them into a file text without space between them - see below

    p_csa = ISCC M4 DP

    where p_csa is a tring to load into a text file



    Code:

    SELECT SUBSTR (p_csa, 0, 0) INTO v_telco FROM DUAL;
    SELECT SUBSTR (p_csa, 1, 4) INTO v_comp FROM DUAL;
    SELECT SUBSTR (p_csa, 5.3) INTO v_csa_prefix FROM DUAL;
    SELECT SUBSTR (p_csa, 8, 4) INTO v_csa_type FROM DUAL;

    fileidinvoice: = UTL_FILE. FOPEN (c_data_location, filenameinvoice, 'W');
    fileidlog: = UTL_FILE. FOPEN (c_data_location, filenamelog, 'W');

    UTL_FILE. PUT_LINE)
    fileidinvoice, v_telco | » '|| v_comp | "|" | v_csa_prefix: "| v_csa_type);


    -the content of the file-

    ISCC M4 DP

    =====================
    I want to remove the space between the chain above for the content of the file should look like this:

    -the content of the file-

    GCSIM4DP

    Hello

    976253 wrote:
    I'm trying to extract the strings and load them into a file text without space between them - see below

    p_csa = ISCC M4 DP

    where p_csa is a tring to load into a text file

    Code:

    SELECT SUBSTR (p_csa, 0, 0) INTO v_telco FROM DUAL;

    Is it always NULL?

    SELECT SUBSTR (p_csa, 1, 4) INTO v_comp FROM DUAL;

    You don't need the double table much in PL/SQL. You can simply say

    v_comp := SUBSTR (p_csa, 1, 4);
    

    Almost all integrated single-row functions work in PL/SQL. (NVL2 is the only one I know who does not work in PL/SQL).

    SELECT SUBSTR (p_csa, 5.3) INTO v_csa_prefix FROM DUAL;
    SELECT SUBSTR (p_csa, 8, 4) INTO v_csa_type FROM DUAL;

    fileidinvoice: = UTL_FILE. FOPEN (c_data_location, filenameinvoice, 'W');
    fileidlog: = UTL_FILE. FOPEN (c_data_location, filenamelog, 'W');

    UTL_FILE. PUT_LINE)
    fileidinvoice, v_telco | » '|| v_comp | "|" | v_csa_prefix: "| v_csa_type);

    What are you trying to do here? For example, what you're trying to put between c_comp and v_csa_prefix?

    -the content of the file-

    ISCC M4 DP

    =====================
    I want to remove the space between the chain above for the content of the file should look like this:

    -the content of the file-

    GCSIM4DP

    If you don't want space, then only concatenate all the spaces in the string before you write it and REPLACE allows you to delete all the spaces that have been copied from p_csa. For example:

    UTL_FILE.PUT_LINE ( fileidinvoice
                , REPLACE ( v_telco || v_comp
                                        || v_csa_prefix
                              || v_csa_type
                       , ' '
                       )
                );
    

    I guess you need the v_comp of separate variables, the v_csa_prefix and the v_csa_type for something.

    I hope that answers your question.
    If this isn't the case, after a complete script that people can run to recreate the problem and test their ideas. Display the results you want (in other words, the contents of the file created).
    Always say what version of Oracle you are using (for example, 11.2.0.3.0).
    See the FAQ forum {message identifier: = 9360002}

Maybe you are looking for

  • IOS has sharply reduced motion

    I use IOS on Iphone 4S 9.3.1 and sometimes get this error. I turn on the proposal to reduce, but the unit automatically goes into motion mode reduce. I try rebootting and it is gone, but rebootting is very troublesome. I think it's a bug on IOS 9. An

  • Why iis it is impossible to talk to someone from support for firfox?

    After the passage of IE8 to FF10 fron as my default browser, the desktop for google icon always opens in Internet Explorer. I spent 1 1/2 hours mucking through your useless FAQ and support (?) forums. There is no such thing as a phone number or e-mai

  • Portege R700, Windows 7, mounted sudden fan/cpu, freeze and force stop

    Hello I have a persistent problem that starts to become annoying... Portege 700 running Windows 7. Normal use (office, WMP, IE anything heavy) No apparent reason (no new requests started for example), there is a sudden increase in the speed of the fa

  • Confused on message settings

    Hi guys,. 
 I am very confused about the Messages app. 
 I have an iPhone OS 9.2.1 and 6 have no 3rd party apps installed and I have never installed one. 
 Under settings > Messages "iMessage" is turned on and 'Send as SMS' is turned off - I don't re

  • Mapping PCI7830R with SCB68

    Hello Sir... I use map series PCI-7830R and connector block SCB68... I traced this time in slot 0 of RMIO cable computer, my question is... I will publish a VI indicating LED in SCB68... I turn on switch in my code... .when I on or off the switch mus