How to replace number with flexible length

Hi..
Could somebody help me, how to replace any number start with more than 2 digits of "0" become 2 digits "0" only. As example:-
Sample Result
123456789 => 123456789
0123456789 => 0123456789
00123456789 => 00123456789
000123456789 => 00123456789
0000123456789 => 00123456789
00000123456789 => 00123456789
Thank you,
Baharin

Or - to handle the situation when '00' is also in between the word:
SQL> with t as (
select '12300456789' str from dual union
select '0123456789' from dual union 
select '00123456789' from dual union
select '000123456789' from dual union
select '0000123456789' from dual union
select '00000123456789' from dual
select str,
        decode(substr(str,1,2),'00', '00' || ltrim(str,'0'),str) new_str
from   t
STR            NEW_STR        
00000123456789 00123456789    
0000123456789  00123456789    
000123456789   00123456789    
00123456789    00123456789    
0123456789     0123456789     
12300456789    12300456789    
6 rows selected.

Similar Messages

  • How i can replace number with "-" to simple 0

    Hello. How i can replace number with “-” like I have “-1423,2” to zero? I need to in each cell with numbers lower than <0 put simple 0

    "K5-G5" offcourse it will be -1433,5. So how I can replace this to 0? But in future I still need get correct result in N5 becouse in future I will change cell K5 write to this cell a nubmer more than 1433,5) "-" G5
    Maybe your explanation was correct but I am not a good in numbers yet, so i don't understand what actualy I need to write in formula cell N5

  • How to replace MobileMe with ICloud on my Imac?

    how to replace MobileMe with ICloud on my Imac? pleae help.  Other devices (Ipad and Iphone) are Iclouded but I can't change MobileMe in my system preferences on IMac (10.6.8)
    Sylwia

    You need to upgrade the computer's OS. Open the Mac App Store and try downloading Mavericks. If you get told it's incompatible, choose About this Mac from the Apple menu, check if the computer has at least a Xeon or Core 2 Duo(not Core Duo) CPU and 2GB of RAM, and if it does, click here and order a download code for Lion 10.7.
    Back up your data before upgrading. Mac OS X 10.7 and newer don't support PowerPC programs such as versions of Microsoft Office prior to 2008.
    (103507)

  • How to register number with iMessage

    How to register number with iMessage

    Hi,
    Thank you for the quick response. The sim card I have in the iPad is a standard "pay n go" sim card with a "data bolt on". If the sim card is placed into any phone, the sim card works as expected to make and receive calls etc.
    I get what you mean about the iPad as I was a little disappointed by the lack of calling and/or messaging. Especially when their main competitors allow the use of SMS etc.
    The issue I have is that iMessage, for some reason, shows the messages as being sent from the recieving mail address. So a iMessage being sent to [email protected] shows up on a.persons iPad as being sent from themselves. Although both iPads are linked to the same iTunes account, the address are different to the address used to set up iTunes. Hence the question regarding the sim cards number.
    Still, no worries and thank you all the same for replying :)
    With Thanks,
    Dave G  

  • How to replace sapdba with brtools after upgrade database to 10.2

    All,
        I have update our database to oracle 10.2,my brtools version is 7.0 now ,
    but can't run analyze table and dbcheck in db13,
    seems to still use SQLDBA when run analyze table and dbcheck.
    please refer to the below informations.
    Detail log:                    0810080300.aly
    *****                 SAPDBA - SAP Database Administration for ORACLE     *****
    SAPDBA V6.10    Analyze tables
    SAPDBA release: 6.10
    Patch level   : 1
    Patch date    : 2001-05-25
    ORACLE_SID    : PRD
    ORACLE_HOME   : /oracle/PRD/102_64
    ORACLE VERSION: 10.2.0.2.0
    Database state: 'open'
    SAPPRD       : 46C
    SAPDBA DB USER:  (-u option)
    OS login user : prdadm
    OS eff.  user : prdadm
    SYSDBA   priv.: not checked
    SYSOPER  priv.: not checked
    Command line  : sapdba -u / -analyze DBSTATCO
    HOST NAME     : sapprd1
    OS SYSTEM     : HP-UX
    OS RELEASE    : B.11.31
    OS VERSION    : U
    MACHINE       : ia64
    Log file      : '/oracle/PRD/sapcheck/0810080300.aly'
    Log start date: '2008-10-08'
    Log start time: '03.00.09'
    ----- Start of deferred log ---
    SAPDBA: Can't find the executable for SQLDBA/SVRMGR. Please, install one of
            them or enter one of them in the SAPDBA profile (parameter
            sqldba_path).
            (2008-10-08 03.00.06)
    SAPDBA: Error - running temporary sql script
            '/oracle/PRD/sapreorg/dbacmd.sql' with contents:
    CONNECT /******** AS SYSDBA
    SAPDBA: Couldn't check SYSDBA privilege.
    SAPDBA: Can't find the executable for SQLDBA/SVRMGR. Please, install one of
            them or enter one of them in the SAPDBA profile (parameter
            sqldba_path).
            (2008-10-08 03.00.06)
    SAPDBA: Error - running temporary sql script
            '/oracle/PRD/sapreorg/dbacmd.sql' with contents:
    CONNECT /******** AS SYSOPER
    SAPDBA: Couldn't check SYSOPER privilege.
    ----- End of deferred log ---
    Analyze parameters:
    Object: All tables in table DBSTATC ( for DB optimization run )
    Method: E ( Default )
    Option: P10 ( Default )
    Time frame: 100 hours
    Refresh   : All objects
    Option: DBSTATCO ( for the DB optimizer: Tables with Flag DBSTATC-TOBDO = 'X' )
    ** Refresh Statistics according control table DBSTATC **
    Total Number of Tables in DBSTATC to be analyzed:                           170
    Number of Tables with forced statistics update (ACTIV = 'U'):                 0
    SAPDBA: SELECT USER# FROM SYS.USER$ WHERE NAME='SAPPRD'
    ORA-00942: table or view does not exist
               (2008-10-08 03.00.09)
    SAPDBA: Error - getting size of segment 'SAPPRD.D010INC'
    SAPDBA: Error - during table analysis - table name: ->D010INC
    SAPDBA: No tables analyzed ( No entries in DBSTATC with TOBDO = X or errors ).
    SAPDBA: 0 table(s) out of 170 was (were) analyzed
            Difference may be due to:
               - Statistics not allowed ( see DBSTATC in CCMS )
               - Tables do not exist on database and were skipped
    Detailed summary of Step 1:
    Number of Tables that needed new statistics according to DBSTATC:             1
    Number of Tables marked in DBSTATC, but non-existent on the Database:         0
    Number of Tables where the statistics flag was resetted:                      0
    ******* Creating statistics for all tables without optimizer statistics *******
    SAPDBA: Using control table DBSTATC
            for taking optimizer settings into account
    SAPDBA: 0 table(s) without statistics were found.
    SAPDBA: 0 table(s) ( out of 0 ) was (were) analyzed/refreshed.
            0 table(s) was (were) explicitely excluded or pool/cluster table(s).
    SAPDBA: 0 index(es) without statistics was (were) found.
    SAPDBA: 0 index(es) ( out of 0 ) was (were) analyzed/refreshed.
            0 index(es) was (were) explicitely excluded or pool/cluster indexe(s).
    SAPDBA: 157 table statistics from 157 tables were dropped.
            They are either explicitely excluded in DBSTATC,
            or R/3 Pool- or Cluster- tables
            that must not have CBO Statistics
    SAPDBA: The whole operation took 10 sec
    SAPDBA: Step 1 was finished unsuccessfully
    SAPDBA: Step 2 was finished successfully
    Date:   2008-10-08
    Time:   03.00.19
    *********************** End of SAPDBA statistics report ****************
    How to replace sapdba by brtools?please give me support,thanks.
    Best Regards,
    Mr.chen

    >     I have update our database to oracle 10.2,my brtools version is 7.0 now ,
    > but can't run analyze table and dbcheck in db13,
    > seems to still use SQLDBA when run analyze table and dbcheck.
    Yes, it does so, because somebody forgot to upgrade the BASIS SP as well...
    What BASIS SP are you using?
    regards
    Lars

  • How to replace numbers with text in tax return pdf using Adobe Acrobat X Pro

    How do I replace numbers with text in tax return pdf using Adobe Acrobat X Pro? The tax return was created using CCH software. Thanks for your review.

    Thanks Bill for your quick reply. CCH software is one of the major
    suppliers of tax return software. I found an internal source that helped me
    make the changes from numbers to text i.e. "$123,456" to "See Schedule O".
    I am not sure if I am working in form or final text. Thanks again! Kelly

  • How To Replace LOVs With Buttons

    Hi all,
    can someone please advise if it is possible to replace LOVs with Buttons? Customer has a requirement to replace the LOVs with buttons in Compensation Manager to approve/reject the paysheet. This is for R12.1.3.
    Many thanks
    Amanda

    Hi,
    1) First create a new region of LOV type.
    2) Then under flowlayout region, add lov action button. On its 'External LOV' property, give the path of lov region created in step1.
    3) Right click on 'lov action button' to add 'lovActionMappings'.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to replace #MISSING with 0 in Hyperion Financial Report

    I am developing report in Hyperion Financial Reporting Studio. The report shows #MISSING for no data and does not look nice. I want to replace #MISSING with 0 (Like I did in SmartVIEW). However, I could not find a way to do that in Financial Reporting Studio.
    Thank you for any help in advance.

    To replace no data (#MISSING) in cells, type a value in the No Data text box.
    Refer: Page 191 of http://download.oracle.com/docs/cd/E12825_01/epm.111/fr_user.pdf
    HTH-
    Jasmine.

  • My ipad has been burnout today while charging it...Today it has been totally burnt and its screen got cracked from middle and charger got so tempered as hot burning rod. kindly suggest how to replace it with new as my ipad is in warranty period..? Rajiv.

    How to replace my burnt ipad while charging it ?????
    plz. HELP ????
    its warranty is till august 18, 2014.

    This is a user-to-user forum here.  You need to talk to Apple Support directly.
    http://www.apple.com/support/contact/

  • How to replace name with number ID

    Example:
    Table1
    T1ID Name1
    1 John Smith
    2 Kathy Smith
    Table2
    T2ID Name2
    100 John Smith
    101 Kathy Smith
    102 John Smith
    103 Kathy Smith
    I want to replace all names in column called Name2 in Table 2, with matching T1ID from Table 1. There are many name repetitions in Table 2.

    If Name2 is VARCHAR and T1id is number then it would be better to add a new column with a consistent data type;
    Sample data;
    create table table1 as (
    select 1 t1id, 'John Smith' name1 from dual union all
    select 2, 'Kathy Smith'from dual);
    Table created
    alter table table1 add constraint table1_pk primary key (t1id);
    Table altered
    create table table2 as (
    select 100 t2id, 'John Smith' name2 from dual union all
    select 101, 'Kathy Smith' from dual union all
    select 102, 'John Smith' from dual union all
    select 103, 'Kathy Smith' from dual);
    Table createdAdd the new column;
    alter table table2
       add name_id references table1(t1id);
    Table alteredUpdate the new column;
    merge into table2 t2
    using (select t1id, name1
           from table1) t1
    on (t2.name2 = t1.name1)
    when matched then
      update
      set t2.name_id = t1.t1id;
    DoneDrop the retired column;
    alter table table2 drop column name2;
    Table altered
    select * from table2;
          T2ID    NAME_ID
           100          1
           101          2
           102          1
           103          2

  • How to replace "." with "," and "," with "." in a quantity field

    HI All,
    I wanna display the field mard-labst in the alv report. Based on the user default settings  2,454.500 is displayed as 2.454,500. Without changing the user default settings how can i display the decimal position correctly..Any help would be highly appreciated.
    Best regards,
    Subhakar Ramineni

    Hi...Subhakar..
    i got ur prob...this is the solution...just paste it and go through it...
    Report  YH642_TEST.
    TABLES:
      mard.
      DATA : W_mard_labst type p decimals 3,
              w_dt1(18).
    data:
      W_N TYPE I.
    SELECT SINGLE * FROM MARD INTO MARD WHERE  LABST = '10000.00'.
      WRITE: mard-labst .
      W_mard_labst = mard-labst.
      WRITE:/ W_mard_labst .
      w_dt1 = w_mard_labst .
      write W_mard_labst to w_dt1.
    W_N = STRLEN( W_DT1 ).
    W_N = W_N - 4.
    REPLACE ALL OCCURRENCES OF ',' IN W_DT1 WITH '.' .
    REPLACE ALL OCCURRENCES OF '.'
    IN SECTION OFFSET W_N LENGTH 4 OF W_DT1 WITH ','.
    WRITE: / W_DT1.

  • How to use datamerge with variable lengths of text?

    Hello,
    I'm looking for a way to automaticly format brochures from a database . I allready found out that datamerge lets you do this quite easily. But I encounter a problem when I use large amounts of text.
    How I see it, the only solution is to reserve enough space for the larges text in order to make all of the text appear in the document. But this leaves large open spaces and even blank pages in my document when I deal with less text.
    Is there a way to make the document adapt to the amount of text? So that Indesign creates more space for large amounts of text and erases blank pages when there is less text?
    Maybe Datamerge isn't the right solution for my problem, I'm open to suggestions.
    Thanks in advance!
    Iris

    I'm just finishing up a directory that I build with data merge and I have the problem of variable length business descriptions, as well as some have extra mailing addresses or websites. My solution is to do it in several steps with multiple files. I do a normal merge first (and I use a single record per page for this, but only bcause that allows me to create some alphabetical lists of business names and owners's names that I can key to a listing number), then I stitch together the individual stories into a single text thread that I copy/paste into place in the final document. If you have a lot of frames, Rorohiko.com has a nifty text stitch script that will help.
    One tip that helps with this method is to be sure you have a paragraph break at the end of each story so stiching the frames together maintains your paragraphs.

  • How to replace IMessage with Ichat

    I have recently updates to os x mountain Lion, and Ichat has been replaced. I hate IMessage how do i get back Ichat.

    HI,
    The iChat App is specific to each Update within an OS X version run.
    Messages is the version on Mountain Lion.
    At OS X 10.8.2 it became version 7.0.1
    That is to say that version 7.0 lasted for OS X 10.8 and 10.8.1
    You can get Messages to look somewhat iChat like.
    Lets say you have AIM (or AIM valid) Names and some Jabber IDs (including GoogleTalk or Facebook)
    Either Add them in Messages the same way you would have in iChat (Use the Plus icon in Preferences > Accounts) or by activating the choice for Messages in System Preferences > Mail, Contacts and Calendars for any ID/Name you use in Mail or elsewhere.
    This will give you a list of Accounts in the Messages Menu > Preferences > Accounts including the iMessages one and the Bonjour one.
    If all are Enabled then the Window menu will now show Buddies (CMD + 1) in addition to the Messages (CMD +0)
    If you use this you will see a combined Buddy List.
    The can be unlinked by going to Messages > Preferences > General Section and Unticking the line that talks about "gather all accounts in to one list"  (actually it is only Buddy lists Account and does not include the iMessages account)
    The Window Menu will now list as many Buddy lists as you have Accounts (Less the iMessage one and any that are not logged in.)
    Each will have it's own keystrokes listed.
    The title of the Buddy list and the Name in the Window Menu is dependant on the Description Field in the accounts pane.
    Example Pic of the Accounts Prefs pane with Buddy lists
    The iMessages account does not have to be active.
    The main draw back is the Messages window itself with it's dual purpose Tabbed Chat window and interface to start Chats without using the Buddy lists.
    Double clicking a chat will open it in it's own window.
    9:39 PM      Thursday; January 24, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to replace lvlib with lvlibp programmatically

    Hello,
    in the project explorer there is the possibility to do a "Replace with a packed library" from the context menu.
    How can I do this programmatically?
    Thank you.
    Christian

    I have a specific use case for this, and was wondering if anyone figured out how to do it. My Google search does not turn up much other than this thread.
    My use case: I have  main code branch that is not ready for LVLIPB's because the architecture is not 100% complete. However, we are release an Executable build on that relies on a pluggable actor framework architecture. Currently I manually branch the code, replace all LVLIB's with LVLIBP's then build additional LVLIPB's from that code and go back and replace the LVLIB's. At that point my code is now ready to be build as an executable with plug-ins. This process takes about 1-2 hrs to complete. This process works and works well repeatedly, it is just time consuming due to the relining. If I could just off load it to another PC that would enable to me to make additional bug fixes or work other issues in the main code branch. Currently we build about once a day or two for final release testing.
    Any help in to script this would be much appreciated.
    Thanks!
    Brian G. Shea
    Systems Integrator / Certified LabVIEW Architect
    National Technical System, Inc.

  • How to replace Consolekit with systemd-loginctl

    Is systemd's new multiseat ready to replace consolekit?
    And if, how can I achieve that?
    My Background:
    - I use systemd as my init system
    - login into a getty
    - which create a new X session with startx through a login script
    I have had a hard time before I had the right setup to supervise everything with *ck-launch-session* and  *dbus-launch* (order matters).
    And sometimes without a reason, something breaks and I'm not allowed to mount USB drives or shutdown as a user without a reboot.
    Last edited by Mic92 (2012-06-01 13:36:59)

    I do have a session:
    ┌─[jente @ lappy ~] 21:48:14
    └─■ loginctl
    SESSION UID USER SEAT
    1 1000 jente seat0
    1 sessions listed.
    I start Udiskie through .xinitrc, like so:
    if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
    fi
    exec bash -c "udiskie & $HOME/.bin/dwm_start"
    With .bin/dwm_start:
    #!/bin/bash
    while true; do
    dwm >/dev/null 2>&1
    done
    EDIT: Here's udiskie's output when I plug in my external HD:
    attempting to mount device /org/freedesktop/UDisks/devices/sdb2 (ext4:[])
    failed to mount device /org/freedesktop/UDisks/devices/sdb2: org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized
    attempting to mount device /org/freedesktop/UDisks/devices/sdb1 (ntfs:[])
    failed to mount device /org/freedesktop/UDisks/devices/sdb1: org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized
    EDIT2:
    Changing my .xinitrc to the following didn't help either:
    udiskie &
    exec $HOME/.bin/dwm_start
    Also, I found out I have to enter my root password to shutdown/reboot, whereas I didn't have to before.
    Last edited by Unia (2012-09-05 19:55:23)

Maybe you are looking for