get the string between {}

IN the string I want to take all values between {and}.

This is the string.

({Location1} # tie # 12-< and > {Item1} # top # (8) < and > {Item2} # # (40) < and > {DOCDATE} "# # 10 January 2015" AND 10 January 2017 ' < and > {amount} # tie # 1).

Vinodh

Here's a way to do what you asked (which may or may not be what you need), using REGEXP_REPLACE to remove everything that is not between two brands of {}:

with t as

(select ' ({Location1} # equal (12) < and=""> {Item1} # more than # (8) < and=""> {Item2} # # (40) < and=""> {DOCDATE} # between # "January 10, 2015" AND 'January 10, 2017' < and=""> {amount} # equal # 1)' txt)

the double)

-end of test data-

Select regexp_replace (regexp_replace (regexp_replace(txt,'}[^}]*{','',1,0),'^ [^ {}] * {', ", 1,0}) {,'}. * $',", 1.0)

t

Tags: Database

Similar Questions

  • Get the string between two operators <>

    Hello

    I have a string that looks like this "text here < emplid > more text here '." Now, I want to choose the data between the < and >. These data is still a number. I tried the following query, but it does not give good results.
    select SUBSTRING(NAME,CHARINDEX('<',NAME),CHARINDEX('>',[NAME])) as col01
    from databasename
    This will result in the number, including the < and > (which I'm not) and some characters more. I also need the rest of the chain to be available to insert in another field.

    Published by: wijnandgritter on 23 January 2012 0:03

    Hello

    You should be able to

    update tablename
    set field = regexp_replace(fieldname,'^.*<(\d+)>.*$','\1 this is an employee')
    where fieldname = '123'
    

    or something similar...

    HtH
    Johan

  • 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".

  • How to get the string (specified by row and column) of txt file with labview

    Hello world

    How to get the string (specified by row and column) of txt file with labview

    THX

    As far as I know, a text file has no column.  Be more specific.  Do you mean something like the 5th word on line 4, where the words are separated by a space, and lines are separated by a newline character?  You can read from the spreadsheet String function and set the delimiter to a space.  This will produce a 2D channels table.  Then use the table to index and give the line number and column number.

  • Query to get the difference between 2 totals of 2 different queries

    I wanted to know if it is possible to get the difference between 2 totals of 2 different queries. Let me explain with an example:

    1 application ofst - sum (homepass) Select table 1

    2th query: select sum (homepass) from table2

    Is it possible to display the difference as -

    Select sum (homepass) in table 1 - sum (homepass) from table2

    I know that the above query would give syntax error, but is there a better way or something to get the above done task from a single query.


    Hopefully, my question is clear.


    Please get back with the answer to my query.


    Concerning

    You can always do something like

    SELECT a.cnt - b.cnt
    FROM (SELECT sum(homepass) cnt from table1) a,
          (SELECT sum(homepass) cnt from table2) b
    

    I'd be somewhat dubious, although on a data model that had two tables with the same name of the column where it really made sense to subtract one amount from each other.  This would strongly imply that there should be a single table with an additional column TYPE eventually.

    Justin

  • How to get the average between the lines are null?

    I need to get the average between the 2 positive numbers.

    Then update the table with the average for the rows that have NULL value between 2 positive numbers.

    The average will come (78 + 89) / 2 = 83.5. Round up to 84.

    Then it will be:

    04/06/13 84

    05/06/13 84

    06/06/13 84

    Regarding the 13/06/09 and 10/06/13, these values will always be NULL.

    {code}

    create the dummy (date of tmestmp of the table

    (, maxtemp number (4,0));

    insert into dummy (tmestmp, maxtemp) values (to_date('20130601','YYYYMMDD'), 70);

    insert into dummy (tmestmp, maxtemp) values (to_date('20130602','YYYYMMDD'), 81);

    insert into dummy (tmestmp, maxtemp) values (to_date('20130603','YYYYMMDD'), 78);

    insert into dummy (tmestmp) values (to_date('20130604','YYYYMMDD'));

    insert into dummy (tmestmp) values (to_date('20130605','YYYYMMDD'));

    insert into dummy (tmestmp) values (to_date('20130606','YYYYMMDD'));

    insert into dummy (tmestmp, maxtemp) values (to_date('20130607','YYYYMMDD'), 89);

    insert into dummy (tmestmp, maxtemp) values (to_date('20130608','YYYYMMDD'), 91);

    insert into dummy (tmestmp) values (to_date('20130609','YYYYMMDD'));

    insert into dummy (tmestmp) values (to_date('20130610','YYYYMMDD'));

    {/ code}

    I need the output to look like this:

    Header 1 Header 2

    1 JUNE 13

    2 JUNE 13

    JUNE 3, 13

    JUNE 4, 13

    5 JUNE 13

    JUNE 6, 13

    JUNE 7, 13

    JUNE 8, 13

    JUNE 9, 13

    JUNE 10, 13

    70
    81
    78
    84
    84
    84
    89
    91

    null

    null

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - production

    PL/SQL Release 10.2.0.4.0 - Production

    "CORE 10.2.0.4.0 Production."

    AMT for 32-bit Windows: release 10.2.0.4.0 - Production

    NLSRTL Version 10.2.0.4.0 - Production

    Suggestions?

    TIA.

    Steve42

    Select tmestmp,

    NVL)

    maxtemp,

    round)

    (

    LAST_VALUE (maxtemp Ignore Nulls)

    (order tmestmp).

    FIRST_VALUE (maxtemp Ignore Nulls)

    (tmestmp order

    lines between the 1 suite and unlimited

    )

    ) / 2

    )

    ) maxtemp

    modeling

    /

    TMESTMP MAXTEMP
    ------------------- ----------
    01/06/2013 00:00:00 70
    02/06/2013 00:00:00 81
    03/06/2013 00:00:00 78
    04/06/2013 00:00:00 84
    05/06/2013 00:00:00 84
    06/06/2013 00:00:00 84
    07/06/2013 00:00:00 89
    08/06/2013 00:00:00 91

    TMESTMP MAXTEMP
    ------------------- ----------
    09/06/2013 00:00:00
    10/06/2013 00:00:00

    10 selected lines.

    SQL >

    SY.

  • What gets the relationship between the number of blocks and coherent?

    SQL> CREATE TABLE TEST(ID INT ,NAME VARCHAR2(10));
    
    SQL> CREATE INDEX IND_IDN ON TEST(ID);
    
    SQL> BEGIN
      2  FOR I IN 1 .. 1000
      3  LOOP
      4  EXECUTE IMMEDIATE 'INSERT INTO TEST VALUES('||I||',''LONION'')';
      5  END LOOP;
      6  COMMIT;
      7  END;
      8  /
    
    SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS(USER,'TEST',CASCADE=>TRUE);
    
    SQL> SELECT DISTINCT DBMS_ROWID.rowid_block_number(ROWID) BLOCKS FROM TEST;
    BLOCKS
    -----------
    61762
    61764
    61763         
    
               >> above , there have 3 blocks in table TEST .
    
    SQL> SET AUTOTRACE TRACEONLY;                                     
    
    SQL> SELECT * FROM TEST;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1357081020                                                     
                                                                                    
    --------------------------------------------------------------------------      
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |      
    --------------------------------------------------------------------------      
    |   0 | SELECT STATEMENT  |      |  1000 | 10000 |     2   (0)| 00:00:01 |      
    |   1 |  TABLE ACCESS FULL| TEST |  1000 | 10000 |     2   (0)| 00:00:01 |      
    --------------------------------------------------------------------------      
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
             72  consistent gets                                    >>  there have 72  consistent gets                  
              0  physical reads                                                     
              0  redo size                                                          
          24957  bytes sent via SQL*Net to client                                   
           1111  bytes received via SQL*Net from client                             
             68  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
           1000  rows processed                                                     
    
    SQL> SELECT /*+ INDEX_FFS(TEST IND_IDN)*/ * FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1357081020                                                     
                                                                                    
    --------------------------------------------------------------------------      
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |      
    --------------------------------------------------------------------------      
    |   0 | SELECT STATEMENT  |      |  1000 | 10000 |     2   (0)| 00:00:01 |      
    |*  1 |  TABLE ACCESS FULL| TEST |  1000 | 10000 |     2   (0)| 00:00:01 |      
    --------------------------------------------------------------------------      
                                                                                    
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       1 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              1  recursive calls                                                    
              0  db block gets                                                      
             72  consistent gets                                   >>  there have 72  consistent gets                  
              0  physical reads                                                     
              0  redo size                                                          
          17759  bytes sent via SQL*Net to client                                   
           1111  bytes received via SQL*Net from client                             
             68  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
           1000  rows processed                                                     
    
                                             
    
    SQL> SELECT COUNT(*) FROM TEST;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 1950795681                                                     
                                                                                    
    -------------------------------------------------------------------             
    | Id  | Operation          | Name | Rows  | Cost (%CPU)| Time     |             
    -------------------------------------------------------------------             
    |   0 | SELECT STATEMENT   |      |     1 |     2   (0)| 00:00:01 |             
    |   1 |  SORT AGGREGATE    |      |     1 |            |          |             
    |   2 |   TABLE ACCESS FULL| TEST |  1000 |     2   (0)| 00:00:01 |             
    -------------------------------------------------------------------             
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                      >>  there have 5  consistent gets               
              0  physical reads                                                     
              0  redo size                                                          
            408  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    
                                                  
    
    SQL> SELECT COUNT(*) FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 735384656                                                      
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    | Id  | Operation             | Name    | Rows  | Bytes | Cost (%CPU)| Time     
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    |   0 | SELECT STATEMENT      |         |     1 |     4 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    |   1 |  SORT AGGREGATE       |         |     1 |     4 |            |          
    |                                                                               
                                                                                    
    |*  2 |   INDEX FAST FULL SCAN| IND_IDN |  1000 |  4000 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                                                                                                
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       2 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                                >>  there have 5 consistent gets     
              0  physical reads                                                     
              0  redo size                                                          
            408  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    
                                              
    
    SQL> SELECT COUNT(ID) FROM TEST WHERE ID IS NOT NULL;
    
    Execution Plan
    ----------------------------------------------------------                      
    Plan hash value: 735384656                                                      
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    | Id  | Operation             | Name    | Rows  | Bytes | Cost (%CPU)| Time     
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                    
    |   0 | SELECT STATEMENT      |         |     1 |     4 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    |   1 |  SORT AGGREGATE       |         |     1 |     4 |            |          
    |                                                                               
                                                                                    
    |*  2 |   INDEX FAST FULL SCAN| IND_IDN |  1000 |  4000 |     2   (0)| 00:00:01 
    |                                                                               
                                                                                    
    --------------------------------------------------------------------------------
    -                                                                               
                                                                                                                                                              
    Predicate Information (identified by operation id):                             
    ---------------------------------------------------                             
                                                                                    
       2 - filter("ID" IS NOT NULL)                                                 
    
    
    Statistics information
    ----------------------------------------------------------                      
              0  recursive calls                                                    
              0  db block gets                                                      
              5  consistent gets                                        >>  there have 5  consistent gets             
              0  physical reads                                                     
              0  redo size                                                          
            409  bytes sent via SQL*Net to client                                   
            385  bytes received via SQL*Net from client                             
              2  SQL*Net roundtrips to/from client                                  
              0  sorts (memory)                                                     
              0  sorts (disk)                                                       
              1  rows processed                                                     
    QUESTION:

    What gets the relationship between the number of blocks and coherent? How to calculate become consistent?

    You can see that your uniform is getting down to 6 to 12, is it not? Reading of the below thread Asktom.
    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:880343948514

    Aman...

  • The most elegant way to get the difference between two tables - not least!

    Hello


    Simplified example of what I'm trying to achieve - I have two tables ORIGINAL and REVISED.


    My aim is to compare the two, such as; -


    When there is data in the two tables I get the difference between the Budget column, and if there is no difference, so I don't want no lines.

    When data exists in the ORIGINAL, but not in review, I want to the inverse of the current value of the Budget column.

    Where the data exist in REVISED I want the REVISED value.

    I can see how I can do this, see below, but is there a more elegant solution?




    Data for the ORIGINAL table
    select '801040' entity, '2186' expense_type, 234000 budget
    from dual
    union all
    select '801040' entity, '3001' expense_type, 1000 budget
    from dual
    union all
    select '801040' entity, 'P132' expense_type, 34000 budget
    from dual
    union all
    select '801040' entity, 'P135' expense_type, 43000 budget
    from dual
    Data for the REVISED table
    select '801040' entity, '2186' expense_type, 235000 budget
    from dual
    union all
    select '801040' entity, 'P132' expense_type, 34000 budget
    from dual
    union all
    select '801040' entity, 'P139' expense_type, 56000 budget
    from dual
    Desired output



    ENTITY EXPENSE_TYPE DIFFERENCE
    ------ ------------ ----------
    801040 2186 1000
    801040 3001-1000
    801040 P135-43000
    801040 P139 56000

    5 selected lines.



    Code current to achieve this, is there a better way?
    select original.entity
    ,      original.expense_type
    ,       (nvl(revised.budget,0) - original.budget) as difference
    from   original
    ,      revised
    where  original.entity = revised.entity(+)
    and    original.expense_type = revised.expense_type(+)
    and   (nvl(revised.budget,0) - original.budget) != 0
    union all
    select  revised.entity
    ,       revised.expense_type
    ,       revised.budget as difference
    from   revised
    where  not exists
    (select 'x'
    from   original
    where  original.entity = revised.entity
    and    original.expense_type = revised.expense_type)
    and    revised.budget != 0
    Thanks a lot for your comments,.


    Robert.

    Published by: Robert Angel on January 17, 2012 03:31 to change is not equal to! = - Thanks for the heads up
    SQL> with original
      2  as
      3  (
      4    select '801040' entity, '2186' expense_type, 234000 budget
      5    from dual
      6    union all
      7    select '801040' entity, '3001' expense_type, 1000 budget
      8    from dual
      9    union all
     10    select '801040' entity, 'P132' expense_type, 34000 budget
     11    from dual
     12    union all
     13    select '801040' entity, 'P135' expense_type, 43000 budget
     14    from dual
     15  )
     16  , revised
     17  as
     18  (
     19    select '801040' entity, '2186' expense_type, 235000 budget
     20    from dual
     21    union all
     22    select '801040' entity, 'P132' expense_type, 34000 budget
     23    from dual
     24    union all
     25    select '801040' entity, 'P139' expense_type, 56000 budget
     26    from dual
     27  )
     28  select *
     29    from (
     30          select nvl(o.entity, r.entity) entity,
     31                 nvl(o.expense_type, r.expense_type) expense_type,
     32                 nvl(r.budget,0) - nvl(o.budget,0) budget
     33            from original o
     34            full join revised r
     35              on o.entity = r.entity
     36             and o.expense_type = r.expense_type
     37         )
     38   where budget <> 0
     39  /
    
    ENTITY EXPE     BUDGET
    ------ ---- ----------
    801040 2186       1000
    801040 P135     -43000
    801040 3001      -1000
    801040 P139      56000
    
    SQL>
    
  • Trying to get the 'difference' between the two tracks

    What I'm trying to accomplish is the following: I have an audio track of a voice-over with a music bed located underneath. I also itsself Chamber music, without the voiceover. I want only the share of voice. Is it possible that I can "cancel out" the part of the music or get the difference between the two tracks (just the voice part)? It seems that there should be a way to do it, but for the life of me I can't figure out how do it!

    Any advice?

    There you go...

    http://www.libinst.com/audio%20DiffMaker.htm

    Unfortunately, the above utility has been abandoned by its author.  :-(

    It only works on Windows XP, to start...

    -RFH

  • Dynamic action - Get the difference between two dates + times

    I have problems a little dynamic to work action. I'm trying to get the time between two dates with the time difference.

    Here is what I got (this is apex 4.0):

    Two date pickers + two numbers fields (date/start/end times)

    I created a dynamic action on the page who fires on the point lose focus (above points).

    The real action for the DA is the body of the PL/SQL function:
    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_char(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MON-YYYY HH:MIAM');
      end_date := to_char(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MON-YYYY HH:MIAM');
      :P1_HOURS := end_date-start_date;
    End;
    When I change the values on the page, I get the following error:

    AJAX call back Server error ORA-06502: PL/SQL: digital or value error: character number conversion error to set the value.

    I'm guessing that there is a problem with the date formatting, but I can't make it work. Thanks in advance!

    Hi djston,

    because you chose the dynamic action of 'Set value' with the "Body of the PL/SQL function" type you need to return the value. Try the following code

    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_date(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MM-YYYY HH:MIAM');
      end_date := to_date(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MM-YYYY HH:MIAM');
      RETURN (end_date-start_date)*24;
    End;
    

    and P1_REQUESTED_HOURS like 'item affected. "

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

    Published by: Patrick Wolf on January 17, 2011 10:54

  • How can I get the string value displayed on a digital control defined for the relative time.

    I have a digital potentiometer to display relative time in increments of 30 minutes.

    I want to record the value displayed on the control string.  Unfortunately, when I use the "convert to decimal string.vi" number, the resulting string is just the value in seconds.

    How can I get the value as a string? (for example 01:30 for an hour and thirty minutes)

    Thank you

    Sean

    Hi Sean.C!

    M_Peeker's suggestion is a good thing.  A stage that could clarify things is that you must set the % t <%H:%M> format string entry.

    < br / > Kristen:.

  • Get the string invalid Base64 of image of toDataURL() for the first time in 10 of blackberry webworks

    Hello

    I need to get the Contact image converted to string Base64 using BB 10 Webworks (blackberry.pim.contacts) I get only the contact.photos [0] .smallFilePath which returns the path to the phonebook file.

    Now, I want to get the image of this path and convert it to a Base64 string.

    Here's the javascript code :

    var img = document.createElement ('Image');
    var canvas = document.createElement ('Canvas');

    function getBase64Image (p) {}
    img.setAttribute ("src", p);

    Img.width = Canvas.Width;

    Canvas.height = img.height;

    CTX var = canvas.getContext ("2d");
    ctx.drawImage (img, 0, 0);
    Return canvas.toDataURL("image/jpg");

    }

    This means bad Base64 string of image for the first time. When I convert this string to the image it displays white screen. But returns a string in the Mithraeum and after conversion, display a correct image.

    I use Blackberry Z10 (OS 10) for the test.

    I think that the canvas is not drawing image properly for the first time.

    I have searched and tried many things, but not got success. What will be the solution.

    Thanks in advance.

    My guess is that the image did not load the source completely still. Setting the src / image loading is an asynchronous event, which means that your code will continue to the next line regardless of whether the image has loaded yet or not.

    After calling setAttribute instead of execute the code of the Web, you will probably need define an event on img for the load event listener. Once the image is loaded, you can then use the img with canvas variable to retrieve its data.

    Note that getBase64 will return immediately, so you may need to develop some sort of mechanism to wait before returning, or the asynchronous approach and integrate reminders for the success trigger the next piece of code.

  • SQL query to get the dates between two dates

    Hello

    We have a chart with start date and end date... Now I need to get all the dates between the start date and end date...

    Table looks to below...

    Create the table date_table (start_date, end_date date);

    The table data will be as below:

    start_date end_date

    January 1, 2013 January 4, 2013

    February 1, 2013 February 3, 2013

    ...............          .................

    ...............          ..................

    ...............           .................

    May 1, 2013 may 3, 2013


    I want a result like below...


    holiday_dates

    January 1, 2013

    January 2, 2013

    January 3, 2013

    January 4, 2013

    February 1, 2013

    February 2, 2013

    February 3, 2013

    .................

    .................

    .................

    .................

    May 1, 2013

    May 2, 2013

    May 3, 2013


    Can anyone help... ?

    Ramesh9158 wrote:

    Hello

    Your query will not work for our case...

    First... We do not know the number of rows in the table... If we cannot use the union...

    Second... hard coding of dates... but we do not know what could be that goes back in the table... it could be no matter what it takes not only as appearing to the interpreter...

    Hey riri.

    My code will work everywhere I use with with union all statement to create the example data.

    Try the query:

    -The main query

    Select d1 + row_number() over (partition by iden) - stopped by iden holiday 1

    Of

    connect by level<= d2="" -="" d1="" +="">

    and prior iden iden =

    and prior sys_guid() is not null

    ----

    Ramin Hashimzade

  • How to get the characters between specific characters in a column?

    A column in a table has values like these:
    1/F/E/WS/A. /
    2 F/BV/DFER/E/C/C/V /.
    3 BN/JK/T/E/R/E/QW /.

    How can I get the values this table:
    D
    V
    QW
    These are the characters between the last two /'s.

    You are looking for something like this?

    with yourtable as
    (
    select 'A/F/E/WS/D/' yourcolumn from dual union all
    select 'F/BV/DFER/E/C/C/V/' yourcolumn  from dual union all
    select 'BN/JK/T/E/R/E/QW/' yourcolumn  from dual
    )
    select rtrim(regexp_substr(yourcolumn, '[^/]*/$'),'/')
    from yourtable;
    
  • How to get the string contents of itemByRange?

    Hi all

    Here's what I'm trying to achieve:

    I selected a Word and you want to get the content of the 1st word in the string (the name of a person).

    1.png

    In fact, the selected text is the source * a hyperlink and my goal is to get the name of the person designated by him.

    [0] is the same as hyperlink.source.sourceText

    Since I can not get the paragraph or line where the selected word is (or simply do not know how to do this), I'm trying to get the full story: from the 1st character of the selected word and moving backward character by comparing its content. When it hits '\r', I know it's the beginning of the line. This way I can get the part of the line, I'm interested with the itemByRange() method, which returns "Array of Character."

    Main();
    
    function Main() {
        var doc = app.activeDocument;
        var sel = app.selection[0];
    
        GetName(sel);
    }
    
    function GetName(txt) {
        var lastCharacter = txt.characters[0];
        var character = txt.characters[0];
        var story = txt.parentStory;
        var index = lastCharacter.index;
    
        while (character.contents != "\r") {
            character = story.characters[index];
            index--;
        }
    
        // Array of Character itemByRange (from: varies, to: varies)
        // Returns the Characters within the specified range. 
        var arr = story.characters.itemByRange(character, lastCharacter);
    
        var str1 = arr.contents[0];
        var str2 = str1.match(/^\S+/);
    
        return str2;
    }
    

    My problem is that I can't get the content- str1 - by script. However, I can see in the data browser that it is there. If I click on str1, it appears:

    2.png

    If I type str1 in the Console, I also get:

    3.png

    I also tried to use:

    arr.getElements)

    arr.getElements () [0]

    .silence arr.getElements () [0]

    etc.

    but that didn't work either.

    I must be missing something very obvious, but I'm stuck. Can someone help me, please?

    Kind regards

    Kasyan

    Hello

    I did something wrong or

    App.Selection [0]. Lines [0]. Words [0] .silence

    is a 1 Word, you are looking for?

    I hope that...

Maybe you are looking for