Find the maximum numeric value to a String

Hi all

I want to find the maximum number of the string using PLSQL. How can I do this simply.

Example string: "D32X1U7".

And I want to get maximum numeric value is of this string. (7)

Thank you

Something like this:

SQL >

SQL > with input_data (select ' D32X1U7' double Str).

2 split_char AS (select substr (str, level 1) c

input_data 3

4. connect by level<=>

5                     )

6 select max (c)

7 of split_char

8 where the regexp_like (c, ' [[: digit :]]');]])

MAX (C)

------

7

SQL >

Tags: Database

Similar Questions

  • Find the maximum, minimum value and other parameters of the XY graph


    Hi florent!

    I think that the problem might be that you use a bundle function to merge signals, which creates a cluster which you can't enter the Express VI for sounds. There are a few options that you can use, the first is to use a merger signals VI (im attaching a photo) then get the parameters and their entry into the chart. The other option would be to use low lvl functions that are on the table Palette, called table max. and Min.

    Hope this information helps you, let me know if there is anything else I can do for you.

    Have a great day!

  • Find the Maximum using the registry to offset

    Hello

    I'm trying to find the maximum value of the input signal and display in the front panel. I managed to achieved this for values that are positive. but when my signal is completely negative it does not update my max.

    I enclose my VI.

    Thanks for your help.

    Dylan

    Here is a quick sketch...

  • Convert a numeric value to a string

    Is there a way to convert a numeric value to a string in calc script? Try to concatenate 'FY' to a variable set to 10, etc... Here's the code...

    Var years;
    Var YrsPl;

    Difficulty (work, No_Location, Current_Forecast, FY09:FY31, "Annual contribution")

    "Adeath Flag")

    Years = "home"->"without year;
    YrsPl = Yrs - 2000 + 1;

    '' =' Depr Flag Depr flag'-> @Member (@Concatenate ("AF", YrsPl)) = 1;

    )
    Endfix

    Hello

    The short answer is no. Essbase calc language does not provide a function for number of string converstion.

    However, you can download the cdf JgetString and use it. It works very well for things like this.

    In the future, please your postal code in the code {{code} tags. Code not formatted is a puzzle to play

    Var Yrs;
    Var YrsPl;
    
    Fix (Working, No_Location, Current_Forecast,FY09:FY31,"Annual Input")
      "Depr Flag" (
        Yrs="Start Year"->"No Year";
        YrsPl=Yrs - 2000 + 1;
         "Depr Flag"="Depr Flag"->@Member(@Concatenate("FY", @JgetString(YrsPl))) = 1;
      )
    Endfix
    

    Kind regards
    Robb Salzmann

  • How to find the maximum and minimum of a waveform between cursors

    Hello!

    Does anyone know an easy way to find the maximum and minimum of a waveform between two sliders?

    Kind regards

    Andreas

    Hi Andreas,

    attached, you get an example of it in MeasurementStudio.

  • Strings, the formula = numeric values?

    is there a way of having a cell to display a string numbers, but when this cell is referenced in a formula it will be used as a numerical value? See screenshot.

    I want the storage capacity label.

    I want the strings displayed in column A to represent numeric values in column B.

    then "128 GB" = 0.13. or "128 GB" = B2. I need a cell to associate it with the value of the other.

    My goal is to make a column of pop-ups with storage capacities that can be used in a formula in another table.

    If you choose "128 GB" I want its value to be 0.13

    I prefer to use a table of choice like that.

    (1) create a table (as you have) that contains the list of text and the corresponding values

    I named the 'TaillePour Value' table

    In the table where you want to use, use the following formula:

    C2 = SIERREUR (IF (VLOOKUP (B2, TaillePour Value::A:B, 2, 0) = 0, ' ", VLOOKUP (B2, TaillePour Value::A:B, 2, 0))," ")

    It's shorthand dethrone select cell C2, then type (or copy and paste it here) the formula:

    = SIERREUR (IF (VLOOKUP (B2, TaillePour Value::A:B, 2, 0) = 0, ' ", VLOOKUP (B2, TaillePour Value::A:B, 2, 0))," ")

    Select cell C2, copy

    Select cells C2 at the end of the C column, paste (or as needed)

  • How to find the maximum value in a collection

    Hi all

    I'm using Oracle 11 g 2. I need to know the maximum value in a collection of items.

    When I run the following, I get the maximum number of collection as '5' but I need the max value itself which is 8, please help.


    DECLARE
    type v_number1 is table of number of directory indexes;

    v_number v_number1;

    IDX NUMBER.
    psrc_file VARCHAR2 (10): = '1,2,4,8,6';
    v_src_file_string_array v_number1;
    number of max_temp;

    BEGIN

    SELECT regexp_substr (psrc_file, "[^,] +', 1, level") coll
    LOOSE COLLECTION v_src_file_string_array
    FROM (SELECT psrc_file FROM dual)
    CONNECTION OF LEVEL < = length (regexp_replace (psrc_file, "[^,] +")) + 1;

    -Set up some test values:
    BECAUSE me IN v_src_file_string_array. FIRST... v_src_file_string_array. COUNTING LOOP
    -v_numbers (i): = v_src_file_string_array (i);
    v_number (i): = i;
    END LOOP;

    max_temp: = v_number (v_number.first);
    IDX: = v_number.first;

    -Display the contents of the table:
    While the idx is not null
    loop
    If (idx) v_number > = max_temp
    then
    max_temp: = v_number (idx);
    end if;

    IDX: = v_number.next (idx);
    end loop;

    dbms_output.put_line ('Max: ' | max_temp);
    end;
    /


    Thank you!

    Harinath Arasu says:
    Hi all

    I'm using Oracle 11 g 2. I need to know the maximum value in a collection of items.

    When I run the following, I get the maximum number of collection as '5' but I need the max value itself which is 8, please help.

    DECLARE
    type v_number1 is table of number of directory indexes;

    v_number v_number1;

    IDX NUMBER.
    psrc_file VARCHAR2 (10): = '1,2,4,8,6';
    v_src_file_string_array v_number1;
    number of max_temp;

    BEGIN

    SELECT regexp_substr (psrc_file, "[^,] +', 1, level") coll
    LOOSE COLLECTION v_src_file_string_array
    FROM (SELECT psrc_file FROM dual)
    CONNECT BY LEVEL<= length(regexp_replace(psrc_file,="" '[^,]+'))="" +="">

    -Set up some test values:
    BECAUSE me IN v_src_file_string_array. FIRST... v_src_file_string_array. COUNTING LOOP

    It should be-online 1... v_src_file_string_array. COUNTY

    -v_numbers (i): = v_src_file_string_array (i);
    v_number (i): = i;

    This should be-online v_numbers (i): = v_src_file_string_array (i);

    Can't do you all just...

    DECLARE
         type v_number1 is table of number index by binary_integer;
         v_number v_number1;
         idx NUMBER;
         psrc_file VARCHAR2(10) := '1,2,4,8,6';
         v_src_file_string_array v_number1;
         max_temp number;
    BEGIN
         SELECT regexp_substr(psrc_file, '[^,]+', 1, level) coll
         BULK COLLECT INTO v_src_file_string_array
         FROM (SELECT psrc_file FROM dual)
         CONNECT BY LEVEL <= length(regexp_replace(psrc_file, '[^,]+')) + 1;
    
         FOR i IN 1..v_src_file_string_array.COUNT LOOP
           if max_temp is null or
                    v_src_file_string_array(i) > max_temp then
                max_temp := v_src_file_string_array(i);
              end if;
         END LOOP;
         dbms_output.put_line ('Max: ' || max_temp);
    end;
    

    Or more simply...

    DECLARE
         type v_number1 is table of number index by binary_integer;
         v_number v_number1;
         idx NUMBER;
         psrc_file VARCHAR2(10) := '1,2,4,8,6';
         v_src_file_string_array v_number1;
         max_temp number;
    BEGIN
             SELECT to_number(regexp_substr(psrc_file, '[^,]+', 1, level))
          BULK COLLECT INTO v_src_file_string_array
             FROM (SELECT psrc_file FROM dual)
                  CONNECT BY LEVEL <= length(regexp_replace(psrc_file, '[^,]+')) + 1
             order by 1 desc;
         dbms_output.put_line ('Max: ' || v_src_file_string_array(1));
    end;
    

    Published by: JAC on April 3, 2013 18:56
    Unhandled exception...

  • find the maximum correlation coefficient

    Hello

    I am able 2 analog signals simultaneously from the DAQ 9233 module.

    Whenever there is a trigger, my DAQ will gather X number of samples from the analog module and a cross on the data correlation analysis.

    My question is how can I get the maximum cross correlation coefficient between the two signals (e.g. North is my reference, how many samples should I change my South to get the maximum correlation coefficient)?

    My goal for this?

    This is so that I can get the time between two samples (e.g.sampling to 50 kHz, if I need to move the sample 300 times, so I know my delay is 300 * 1/50000 = 6ms)

    Thank you.

    Attached a picture of my waveforms

    North = my reference signal

    South = my 2nd signal

    Low = Corss correlation between two signals

    I'm sure that the maximum value of the cross-correlation function is the location the highest correlation coefficient.  Using your own example to verify this.

    Search the index of this value.  Subtract the size of the reference (in the X of entry) of the peak value index signal.  The value obtained must be the number of points which is equivalent to one quarter of work.  Divide this value by your sampling frequency (50,000 in your case) and you should have your answer.

  • Cannot find the MAX Date value in the USER_TAB_PARTITIONS HIGH_VALUE

    Hi all

    I'll try to find the Max value of the date of the HIGH_VALUE from the USER_TAB_PARTITIONS, but my request has failed because the HIGH_VALUE is a LONG column.

    Appreciate your valuable contributions here.

    Thank you
    MK.

    Maldini says:
    I'll try to find the Max value of the date of the HIGH_VALUE

    You use the PL/SQL:

    SQL> select  high_value
      2    from  user_tab_partitions
      3    where table_name = 'RANGE_SALES'
      4  /
    
    HIGH_VALUE
    ----------------------------------------------------------------------------------------------
    TO_DATE(' 1998-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1998-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1998-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1999-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1999-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1999-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 1999-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 2000-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 2000-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 2000-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    TO_DATE(' 2000-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
    
    HIGH_VALUE
    ----------------------------------------------------------------------------------------------
    MAXVALUE
    
    12 rows selected.
    

    Now:

    create or replace
      type DateList
        as
          table of date
    /
    declare
        v_DateList DateList := DateList();
        v_max_high_value date;
    begin
        for v_rec in (select high_value from user_tab_partitions where table_name = 'RANGE_SALES') loop
          if v_rec.high_value != 'MAXVALUE'
            then
              v_DateList.extend;
              execute immediate 'begin :1 := ' || v_rec.high_value || '; end;'
                using out v_DateList(v_DateList.count);
          end if;
        end loop;
        select  max(column_value)
          into  v_max_high_value
          from  table(v_DateList);
        dbms_output.put_line('Table RANGE_SALES max high value is ' || to_char(v_max_high_value,'MM/DD/YYYY HH24:MI:SS'));
    end;
    /
    Table RANGE_SALES max high value is 10/01/2000 00:00:00
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • find the number of underscores in a string

    Hi all -

    Is it possible to find the number of underscores in a simple string using SQL?

    Thank you-

    This?

    length (txt) -
           length (replace (txt, '_'))
    
  • How to find the first max value for each item

    Hello

    I have the me_result of the table as below,

    SELECT * FROM me_result;

    ID     ||| ELITE     ||||||||||| FREQ_ITEM | COMBINED_STR | SUP
    1     ||; 1; 10; 2; 3; 4; 5; 7; 8. 1     ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
    2     ||; 1; 10; 2; 3; 4; 5; 7; 8. 2     ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
    3     ||; 1; 10; 2; 3; 4; 5; 7; 8. 3     ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
    4     ||; 1; 10; 2; 3; 4; 5; 7; 8. 4     ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
    5     ||; 1; 10; 2; 3; 4; 5; 7; 8. 5     ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
    6     ||; 10; 2; 3; 4; 5; 8; 9. 1     ||||||||||||||; 10; 2; 3; 4; 5; 8; 9; 1 ||| 1
    7     ||; 10; 2; 3; 4; 5; 8; 9. 2     ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
    8     ||; 10; 2; 3; 4; 5; 8; 9. 3     ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
    9     ||; 10; 2; 3; 4; 5; 8; 9. 4     ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
    10     ||; 10; 2; 3; 4; 5; 8; 9. 5     ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2


    I need to find the first COMBINED_STR max for each element of the ELITE,
    I mean, max value is the max REGEXP_COUNT (combined_str,' ;')))

    really, I try to write down, but I had a lot of values for each ELITE and I need only the first, that
    SELECT * from me_result
    WHERE (ELITE, REGEXP_COUNT (combined_str,' ;')))) IN
    (SELECT ELITE, MAX (REGEXP_COUNT (combined_str,' ;'))))) ME_RESULT ELITE GROUP);

    I need the result to be as below.

    1; 1; 10; 2; 3; 4; 5; 7; 8-1; 1; 10; 2; 3; 4; 5; 7; : p
    6; 10; 2; 3; 4; 5; 8; 9 1; 10; 2; 3; 4; 5; 8; 9; 1 1

    any help please,.

    Published by: user11309581 on July 10, 2011 22:03

    Can be

    with t as
    (select 1     ID, ';1;10;2;3;4;5;7;8'     ELITE, 1     FREQ_ITEM, ';1;10;2;3;4;5;7;8' COMBINED_STR, 2 SUP from dual union all
    select 2     ,';1;10;2;3;4;5;7;8'     ,2     ,';1;10;2;3;4;5;7;8'     ,2 from dual union all
    select 3     ,';1;10;2;3;4;5;7;8'     ,3     ,';1;10;2;3;4;5;7;8'     ,2 from dual union all
    select 4     ,';1;10;2;3;4;5;7;8'     ,4     ,';1;10;2;3;4;5;7;8'     ,2 from dual union all
    select 5     ,';1;10;2;3;4;5;7;8'     ,5     ,';1;10;2;3;4;5;7;8'     ,2 from dual union all
    select 6     ,';10;2;3;4;5;8;9'     ,1     ,';10;2;3;4;5;8;9;1'     ,1 from dual union all
    select 7     ,';10;2;3;4;5;8;9'     ,2     ,';10;2;3;4;5;8;9'     ,2 from dual union all
    select 8     ,';10;2;3;4;5;8;9'     ,3     ,';10;2;3;4;5;8;9'     ,2 from dual union all
    select 9     ,';10;2;3;4;5;8;9'      ,4     ,';10;2;3;4;5;8;9'     ,2 from dual union all
    select 10     ,';10;2;3;4;5;8;9'     ,5     ,';10;2;3;4;5;8;9'     ,2 from dual
    )
    select ID,ELITE,FREQ_ITEM,COMBINED_STR,SUP
    from (
      SELECT ID,ELITE,FREQ_ITEM,COMBINED_STR,SUP, ROW_NUMBER() over (PARTITION BY ELITE order by id) RN
      FROM t
      WHERE (ELITE,REGEXP_COUNT(combined_str,';')) IN
        (SELECT ELITE,MAX(REGEXP_COUNT(combined_str,';')) FROM t GROUP BY ELITE)
    ) where RN=1
    order by id
    
    ID                     ELITE             FREQ_ITEM              COMBINED_STR      SUP
    ---------------------- ----------------- ---------------------- ----------------- ----------------------
    1                      ;1;10;2;3;4;5;7;8 1                      ;1;10;2;3;4;5;7;8 2
    6                      ;10;2;3;4;5;8;9   1                      ;10;2;3;4;5;8;9;1 1     
    
  • Where can I find the maximum speed and size for a 2000 HP RAM memory

    I looked at the stick of 4GB that comes with it and she has this information on it.

    MT16KTF51264HZ - 1G6M

    4 GB 2RXB PC3L-12800-11-11-7 P

    I would like to know what exact memory to get and how much can be set which is actually useful.  As it is now, it's quite slow.

    Simply duplicate this module you have. At the moment no HP laptop consumer cannot accept any faster than this alias DDR3-1600 PC3-12800 memory.

    Quote of repair:

    Supports up to 8192 GB of RAM.

    Up to 8 GB is the maximum. An SSD would be on the upgrade of the only possible performance. On AMD models, the CPU is soldered to the motherboard, so you can't upgrade that. With the processor AMD E1, I am skeptical even with 8 GB of RAM and an SSD, you have a usable computer, frankly.

  • LR 6 BOX - PC update and serial number is already in use by the maximum allowed value of computer

    Hello

    I have a problem with the version of Lightroom 6.0 activation boxes.
    A message on exceeding the maximum number of computers on which the software is installed. I have a computer that has been upgraded in recent times 3 x is still installed on the same Windows or Lightroom and now jumped the registration issue.


    How to solve this problem?


    On the website adobe is only 2-way contact.

    1, cat - actually closed

    2 forum


    Concerning


    You must contact the Support by chat and ask them to reset your activations

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • How can I find the maximum number of recorded sessions ever?

    Hello

    I see the sessions_highwater column in the license of $ v is the maximum number of sessions since the database startup time, but I wonder if there is a view that shows the maximum number of sessions ever recorded? (that is, before the last restart of the database)

    Thank you!

    Jon

    Query dba_high_water_mark_statistics

  • find the most recent value based on the defined date

    Hi all

    In my example below, I want to find the last symptom and the name that was added after 24-mar-2012 (not before that). Not getting not good performance




    with xx as
    (select 101 as the ID, "A01" as name, 24 March 2012 ' than double create_date)
    Union of all the
    Select 101, "A01", March 24, 2012 "of the double
    Union of all the
    Select 102, "A02", March 24, 2012 "of the double
    Union of all the
    Select 101, "A01", March 30, 2012 "of the double
    Union of all the
    Select 102, "A02", March 30, 2012 "of the double
    Union of all the
    Select 102, "A01", April 21, 2012 "of the double
    Union of all the
    Select 101, "A01", April 22, 2012 "of the double

    ),

    XY as
    (select 101 as the ID, "Asthma" as a symptom of double
    Union of all the
    Select 101, 'cancer' of the double
    Union of all the
    Select 101, 'bpressure' from dual
    Union of all the
    Select 102, 'sbp' of the double
    Union of all the
    Select 101, 'BPD' of the double
    Union of all the
    Select 102, 'allergy' of the double
    Union of all the
    Select 103, "heart failure" of the double
    Union of all the
    Select 102, 'sneezing' from dual

    )

    Select xx, xy, xx.name, xy.symptom, xx.create_date
    where xx.id = xy.id
    Group of xx.name, xy.symptom, xx.create_date
    "After having xx.create_date > 24 March 2012"
    with xx as
    (select 101 as ID, 'A01' as name, '03/24/2012' as create_date from dual
    union all
    select 101, 'A01', '03/24/2012' from dual
    union all
    select 102 , 'A02', '03/24/2012' from dual
    union all
    select 101 , 'A01', '03/30/2012' from dual
    union all
    select 102 , 'A02', '03/30/2012' from dual
    union all
    select 102 , 'A01', '04/21/2012' from dual
    union all
    select 101 , 'A01','04/22/2012' from dual
    
    ),
    
    xy as
    (select 101 as ID, 'asthma' as symptom from dual
    union all
    select 101 , 'cancer' from dual
    union all
    select 101 , 'bpressure' from dual
    union all
    select 102, 'sbp' from dual
    union all
    select 101 , 'dbp' from dual
    union all
    select 102, 'allergy' from dual
    union all
    select 103 , 'cardiac failure' from dual
    union all
    select 102 , 'sneezing' from dual
    
    )
    
    select xx.name, xy.symptom, xx.create_date from xx, xy
    where xx.id=xy.id
    and substr(xx.create_date,4,2)>24
    group by xx.name, xy.symptom,xx.create_date;
    

Maybe you are looking for