Please run this logic of the string conversion

One please implement the logic below

I have an input string to be converted by adding "0" when necessary.

Case 1

If the entry is like "3,8,13,18,23,28,33,38,43,48,53,58" and I want the output as '03,08,13,18,23,28,33,38,43,48,53,58'

Case 2

If the entry is like '03,08,13,18,23,28,33,38,43,48,53,58' put it out should be like "03,08,13,18,23,28,33,38,43,48,53,58"


Would be greate if someone could implement.

Thank you-

An option is to add a '0' to each number and remove all numbers 0 to 3 digits in the result:

with t as (
select '3,8,9,18,23,28,33,38,43,48,53,58' as s from dual union all
select '03,08,13,18,23,28,33,38,43,48,53,58' from dual
)
select regexp_replace(
          regexp_replace(s,'(\d+)'  -- one or more digits
                                  ||'(,|$)' -- followed by a comma or end-of-string
                                  ,'0\1\2'  -- pad a 0 in front
                               ),
                              '0(\d\d)'     -- a 0 followed by 2 digits
                              ,'\1')        -- remove the 0
          as s from t
;

I guess you will never have 3 digits in your channel.

Kind regards
Bob

Tags: Database

Similar Questions

  • How to start the Audit Vault (Please run this command at the Vault review officer)

    Hi all.
    I just finished to complete a facility audit Vault on a dev linux system and all processes were available.

    In any case I had to restart my linux machine, but no process started automatically :(

    I'm reading how to start 'something'... by the use of the (e13841.pdf) Administrator's Guide...
    but without results...
    I don't know (I want to say I still have not found in the doc) sequences correct to start and stop services... when start the database... If there is a command to automatically audit Vault start the database...

    I tried...
    [oracle@auditvault ~] $ avctl show_oc4j_status
    AVCTL began
    Please run this command at the verification officer Vault.
    Leaving the control Audit Vault
    [oracle@auditvault ~] $ avctl start_oc4j
    AVCTL began
    Please run this command at the verification officer Vault.
    Leaving the control Audit Vault

    Thanks for your help

    Here are some actions you need to perform:

    Audit Vault Server you installed in your machine in ORACLE_HOME1
    You have installed Audit Vault Agent in your machine in ORACLE_HOME2

    1 / your database from ORACLE_HOME1

    export ORACLE_SID = yoursid
    sqlplus / as sysdba<>
    startup
    output
    EXPRESSIONS OF FOLKLORE

    2 / the AV from ORACLE_HOME1 Server

    avctl start_av

    3 / the agent runtime from ORACLE_HOME2 AV

    avctl start_oc4j

    4 / your agent from ORACLE_HOME1

    avctl start_agent - nom_agent

    At this point, you should be able to start any collector that you created previously. Be in command line mode, ORACLE_HOME1, or through the web console...

    Yves

    Published by: yves77 on May 14, 2009 19:21

  • It is possible to run Adobe Bridge CS6 on my Toshiba 32 bit?, I don't know why, but when I try to run this program, then the DEP blocks Adobe Bridge, what's the problem?

    Adobe Bridge CS6 on my Toshiba 32 bit?, I don't know why, but when I try to run this program, then the DEP blocks Adobe Bridge, what's the problem?

    This means that the program will use the incorrect memory or he is attacked by hackers or virus. See if there is an updated version.

    To allow the program to function in any case type DEP in the Start menu - Help and Support.

    Help

    Change Data Execution Prevention settings

    Data Execution Prevention (DEP) is a security feature that protects against viruses and other security threats by analyzing your programs to make sure that they use the system safely memory.

    If you choose to protect all programs, you can always turn off DEP for individual programs. If you think that a program does not run correctly when DEP is enabled, check for a compatible version of the DEP program or an update from the software publisher before you change your DEP settings.

    1. Click to open the system.

    2. Click Advanced system settings.  If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. Under performance, click settings.

    4. Click the Data Execution Prevention tab, and then click turn on DEP for all programs and services except those I select.

      To turn off DEP for an individual program

      • Select the check box next to the program that you want to turn off DEP for and then click OK.

        If the program is not in the list, click Add. Navigate to the Program files, search for the executable file of the program (it will have the .exe extension) and then click Open.

      To turn on DEP for an individual program

      • Clear the check box next to the program that you want to turn on DEP for and then click OK.

  • problems of the admin: message saying insufficient privileges: you must be an administrator when you run this application for the first time

    I bought this new comp with windows 7 already installed. has worked fine up intill a week or two it y a. I installed a new game, and after installation, I press launch to play it and pop up with a message saying not sufficient privileges: you must be an administrator when you run this application for the first time. also, I thought that I must be the administrator when I tried to launch the disk defragmentation. my account is the administrator account so I don't understand why they say that.

    I'm sorry. I was reading through additional FAQS regarding the same problem. I saw where someone said to try to add another admisistrator account to try to take on the former. but I had no luck with this ether. I also downloaded the program of the UAC, and I turned it off, reset my computer and still no change to my problem. I also tried to download the MSE restore tool, but I found myself with a message saying that I have no MSE

    Sorry, the MSE tool is to set the MSE when its broken.
    UAC controller Tool v1.0 can be used to control the
    The UAC settings.

    However, I suggest you restart the PC and after BIOS hold the F8 key
    and when the Windows Startup Menu appears, select Mode safe mode with networking.

    Now, you will enter Safe Mode. On the page to connect, you will see the
    Standard Windows administrator click it to open a windows session, press and hold
    in mind, the password can be blank.

    Once you have done that make a new account administrator and giv it a name.
    Restart the PC. That you did this newspaper using the new account.
    Once you have done that decide what to keep with your current administrator
    account once you've done it restart the PC, BIOS hold down the F8 key and
    Select Mode safe mode with network and enter dependencies the Standard Windows administrator.

    Go to control panel-> user accounts control and security for the family-> user accounts, then
    Select manage another account. In the list, select the administrator account
    your select and then delete the account, then it will ask you if you want to keep
    files etc, it's your own decision. Itknowledge24.com

  • a stupid question about the string conversion error

    I learn generic

    well generic allows setting the data type that you add to the fields of the object, right?

    I made a simple example

    class generic < String >

    {

    The name of the string;

    void set (String name)

    {myIdName = name ;}

    String get() {return myIdName ;}

    }

    class using {}

    Public Shared Sub main (String [] args)

    {

    generic < String > gn = new

    (generics) < String >;

    GN. Set (90);

    System.out.println ("name entered is:" + gn.get ());

    }

    }

    now the line

    GN. Set (90);

    I know that I send a string to the value method, but I wanted to see the error that comes when I send the argument of type other than a string and sent 90 to set method (without quotes)

    the error that slammed me is

    method defined in the class generic < String > cannot be applied to the given types

    required: java.lang.String

    found: int

    reason: int real argument cannot be converted to a java.lang.String by method invocation conversion

    corresponding to a variable of type String: String extends the object declared in the class generic

    OK here is my stupid question

    I know that int cannot be converted to a string and put 90 quotes will correct the error

    What intrigued me is the last line

    "Chain extends object declared in the class generic.


    I know that everything is under the object class

    that means that means line... ??

    thnq

    What intrigued me is the last line

    "Chain extends object declared in the class generic.


    I know that everything is under the object class

    that means that means line... ??

    Which refers to the class definition you provided:

    generic class

    You "stated" in your 'generic' class a 'collar' stretching ' the object '. It reads as if it said "String declared in the class generic.

    See "Generic Types" in the Java Tutotial

    http://docs.Oracle.com/javase/tutorial/Java/generics/types.html

    Search for the word 'object' and you'll see that word highlighted in the world. Although it appears highlighted read this line:

    As you can see, all instances of the object are replaced by T. A variable of type can be any non-primitive type you specify: any type of class, any interface, any type of table or even another variable of type.

    On this page, you will see this:

    A generic class is defined with the following format:

    class name { /* ... */ }
    

    Where each one is read as: T1 extends object ', "T2 extends object", etc.

    When you said this:

    generic class

    You replaced "T1 extends object" with "String extends object".

  • Insufficient privileges: you must be an administrator when you run this application for the first time.

    I have an alienware laptop with windows 7. All my other games work fine, the game installs just fine but when I try to play X 3 Terran conflict, I get this error message. Mine is the only user on the computer account and I am the administrator. Someone please help, this is my favorite game of all time!

    Hi jamesgrey,

    See the link on the site of the game seller where it says that you need to install a fix for this error message below.

    http://www.Egosoft.com/support/FAQ/faq_answer_en.php?answer=1676&version=9&SID=688d193cacfacd06f51d0679e9b0bcca

    For additional support post your query in the forums of game seller.

    http://www.Egosoft.com/support/FAQ/faq_answer_en.php?answer=1676&version=9&SID=688d193cacfacd06f51d0679e9b0bcca

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Please explain this part of the code

    CREATE OR REPLACE PROCEDURE IS abc123
    -Statements
    v_T_MAP_record T_MAP_map % ROWTYPE;

    TYPE t_element_cursor IS REF CURSOR;
    v_T_MAP_cursor t_element_cursor;

    number of v_T_MAP_count;
    BEGIN
    DBMS_OUTPUT. ENABLE (1000000);
    v_T_MAP_cursor: = get_T_MAPs (1308); -This will get the record of the cursor

    -Open the cursor
    EXTRACTION v_T_MAP_cursor
    IN v_T_MAP_record;

    V_T_MAP_cursor % FOUND LOOP

    dbms_output.put_line ('uc.use_case_id: ' | v_T_MAP_record.use_case_id);


    v_T_MAP_count: = v_T_MAP_count + 1;

    EXTRACTION v_T_MAP_cursor
    IN v_T_MAP_record;

    END LOOP;

    -Close the cursor
    CLOSE V_T_MAP_cursor;

    EXCEPTION
    While OTHERS THEN
    dbms_output.put_line ('Error' |) TO_CHAR (SQLCODE) | ': ' || SQLERRM);
    END;

    I do not understand why we are having 2 game instruction Fetch IN v_T_MAP_record's first before the while loop v_T_MAP_cursor and the other inside the v_T_MAP_cursor. Please explain. If I remove the second instruction fetch inside the loop, it gives me a buffer overflow error.

    It's what he does...

    CREATE OR REPLACE PROCEDURE abc123  IS
        --Variable declarations
        v_T_MAP_record T_MAP_map%ROWTYPE;
    
        TYPE t_element_cursor IS REF CURSOR;
        v_T_MAP_cursor t_element_cursor;
    
        v_T_MAP_count number;
      BEGIN
        DBMS_OUTPUT.ENABLE(1000000);  -- THIS ISN'T REALLY NEEDED
    
        -- This opens the ref cursor, it doesn't fetch anything (assuming get_T_MAPs doesn't fetch itself)
        v_T_MAP_cursor := get_T_MAPs(1308);
    
        -- This fetches the first record from the cursor
        FETCH v_T_MAP_cursor
          INTO v_T_MAP_record;
    
        -- If a record is found we enter a loop
        WHILE v_T_MAP_cursor%FOUND LOOP
          -- output the current record details
          dbms_output.put_line('uc.use_case_id: '||v_T_MAP_record.use_case_id);
          v_T_MAP_count := v_T_MAP_count + 1;
    
          -- fetch the next record
          FETCH v_T_MAP_cursor
            INTO v_T_MAP_record;
          -- loop back to the start of the while loop
        END LOOP;
    
        --Close the cursor
        CLOSE v_T_MAP_cursor;
    
      -- Pointless stupid exception handler
      EXCEPTION
        when OTHERS THEN
          dbms_output.put_line('Error ' || TO_CHAR(SQLCODE) || ': ' || SQLERRM);
      END;
    

    Although this would be a better style:

    CREATE OR REPLACE PROCEDURE abc123  IS
      --Variable declarations
      v_T_MAP_record T_MAP_map%ROWTYPE;
      TYPE t_element_cursor IS REF CURSOR;
      v_T_MAP_cursor t_element_cursor;
      v_T_MAP_count number;
    BEGIN
      -- This opens the ref cursor, it doesn't fetch anything (assuming get_T_MAPs doesn't fetch itself)
      v_T_MAP_cursor := get_T_MAPs(1308);
    
      LOOP
        -- This fetches the first/next record from the cursor
        FETCH v_T_MAP_cursor INTO v_T_MAP_record;
        EXIT WHEN v_T_MAP_cursor%NOTFOUND;
    
        dbms_output.put_line('uc.use_case_id: '||v_T_MAP_record.use_case_id);
        v_T_MAP_count := v_T_MAP_count + 1;
      END LOOP;
    
      --Close the cursor
      CLOSE v_T_MAP_cursor;
    END;
    

    However, I would also change things to use the SYS_REFCURSOR as the need to define your own type from the REF CURSOR was placed back in 9i with the new type built in SYS_REFCURSOR.
    There are probably many other things I would like examine why I'm using ref Cursor in the first place and why I try to write data using dbms_output etc., but hey, we all have start somewhere.

    Published by: BluShadow on 28-Sep-2012 14:28

  • the string conversion to

    "" Hi everyone my Q is: is there any function to convert the following string to number "$GPGGA, 111659.148, 3350.8959, N, 07243.9143, E, 1, 03, 3.4 39.4, M, 39.4, M, 0000 * 46" iam using Labview 8.5 it is some available funtion that converts a string to a number, but they does not convert the equivalent character achii number they put 0 whenever the chain is containing the characters A to Z as in above sentence... There are some character like $GPGGA N E etc... .i need also to fullfill my requirments achii code I don't want to lose that to 0 instead of its equivalent achii, THX in advance please its very urgent iam waiting for any solution please

    Work with small chains I often analyse how

  • Hi all. When l lance a game Sudden Strike 3 I get error "insufficient privileges: u must be administrator when you run this application for the first time". What should I do?

    I have already checked that his play on preivileges admin % but still run it.

    Make a right click on the shortcut, go to properties, then find target. Right-click on the application and in the menu that appears, select run as administrator.

    The message that you shouldn't have to do is run once in this mode.

  • How to convert this logic in the report?

    Hi Experts,

    I have a requirement as below,

    Column B = count (column A = "YES") / total count (column A)

    So if you see here, column B is the number of column where column = 'YES' A divided by the total number of column a.

    I would like to know how to implement it's report.

    Please help me.

    PS: Change in the DPR MDB is not suggested by customer.

    Any help will be appreciated with points.

    Thank you.

    Hi user
    Try this query
    Count (case where column = 'Yes' then column one end otherwise null) / count (column A)

  • Points table for the string conversion of floating

    Is it possible to convert an array of floating point and keep the decimals, while in the version of the loop below, without no loop?

    How about using "String in array to worksheet" and the "worksheet of array of strings" back to back.

  • I paid to be a member of the Adobe every month, and I just noticed that I can not download a complete version of all creative products only a trial... This was never the case! Can someone explain please why this seems to be a scam?

    Hello world

    For years I had to pay a subscription for Adobe Creative cloud that allowed me to use all Adobe products. Recently, I have noticed that I am only allowed to upoad a trial version of Adobe not a full version which was the case before.

    so I'm not sure what I pay for every month...

    Someone at - it from Adobe can give me an answer to this, because it seems to me that I throw my money out the window.

    Thank you

    Concerning

    Paulina

    Hello

    Please refer to the steps below: -.

    First of all, disconnect, then back into creative cloud, using adobe id to pay for your subscription.

    https://helpx.Adobe.com/creative-cloud/help/sign-in-out-activate-apps.html

    Then, if you launch any product of CC 2015 and the pop up still shows a trial message window, please check this link for the resolution:

    https://helpx.Adobe.com/manage-account-membership/CC-reverts-to-trial.html

  • Why flatten data chain not getting past all about TestStand via a local variable of the string?

    I tried to go around a series of data in TestStand as a string using "flattened chain" of LabVIEW. When I create a local variable in TestStand of type 'string' and try to write the cluster flattened at this that he simply not transmitted. If I convert the string flat binary table and then pass it around, I can recover all the data very well.

    Is there something I'm missing here?

    I've attached an example Teststand sequence that illustrates this problem. If you run this sequence that the 1st test will fail, which is the attempt to simply pass the flattened string data structure and the 2nd test will pass as it is the binary table that I generated from the flattened string.

    Thank you

    Pete

    crossrulz is correct.  The Null character affects how TestStand handles the string.  You will need to specify the string to a binary string in the list of settings both the VI.  TestStand then encodes the stringso it can prevent the loss of data.

    If you need work on the binary string in TestStand, you will need to convert it to an array of raw data with PropertyObject.GetValBinary.

  • When I try to click on anything on my office say "Publisher could not be verified are you sure you want to run this software?"

    original title: don't know

    When I try to click on anything on my office say "Publisher could not be verified are you sure you want to run this software?" The icons for all my programs are now icons of internet explore instead of original icons there. ?

    When I click on something like windows media player, it appears on my screen do you want to run or save this file? I then click on run and then it happens the Publisher could not be verified are you sure you want to run this software? ... Please help!

    How long is what happens?

    Can you remember a time when you did not have this problem?
    If so, can you do a system restore and use this date as your restore point?

    How to restore the system:
    Start button > Search box, type system restore > press the Enter key > uac prompt > click on choose a different restore point > next > select dates as your restore point, until the click > next > finish
    To sit and wait. The machine restarts when it's done.
    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Attachments does not work for Safari browser. Please fix this. THX.

    I use Safari. No problem with the previous version of the email. This new version has a broken attachment link. Please fix this. Thank you.

    I use Safari. No problem with the previous version of the email. This new version has a broken attachment link. Please fix this. Thank you.

    Hello

    Please ask this question on the following support forums.

    Safari: Apple Support communities:
    https://discussions.Apple.com/community/Mac_os/Safari?view=overview

    Concerning

Maybe you are looking for

  • Camcorder Vixia HF R400 of load

    I will be going to England this fall and I need to know what I need to recharge my camcorder Vixia HF R400. The manual says not to use an adapter, but I know I need an adapter to connect an American plane in a European plug.

  • How can I fix the search indexer error I get every day?

    I get this error several times report a day for a month.

  • Responsive text box

    HelloExcuse what probably is a very basic question, but although he had nearly 20 years of experience in graphic design, I am a relative noob when it comes to Web design. I have a landing page, I'm doing for a client (Dropbox - AYIN Website.zip ) whi

  • js and css downloaded from apex of static files 4.2.4

    Hello1. I need to know in what file are stored files js downloaded from 'components shared - static files?2. I need to know in what file are stored the css files downloaded from "sharing of components - Cascading Style Sheets?My version of the apex i

  • The Oracle Critical Patch Update Advisory - January 2013

    Hi all11.2.0.3Package Oracle Critical Patch Update - January 2013I'm confused about CPU, PSU, UPE, USP. I read the docs, and it seems that they are same thing being rambled?Which one is more important to apply?Thank youPetraK