How to replace a string with asterisks? This is related to my previous post

I guess I now replace the middle segment of which is recovered by asterisks.

Thus, the string in the middle of "99999988" should be replaced by ' *'. Basically, I'm trying to hide the average advertising channel. The length of the original string is not known, but the first segment is 6 characters and 3 segment is 4 characters. Intermediate gum can be between 5 to 10 characters. In the example below, its 8 characters.

Can I use functions REPLACE or TRANSALE here?
  select substr('456712999999881234', 1, 6) a,
         substr('456712999999881234', 7, length('456712999999881234') - 10) b,
         substr('456712999999881234', -4) c
  from      dual;
Thank you

Hello

So, you want a chain of n - 10 b *, where n is the length of the string:

SELECT  SUBSTR (txt, 1,  6)               AS segment_1
,       RPAD ('*', LENGTH (txt) - 10, '*')     AS segment_2
,     SUBSTR (txt, -4)                             AS segment_3
FROM     table_x;

It doesn't matter what were these characters, so you can't use TRANSLATE.

Tags: Database

Similar Questions

  • How to replace the paragraph with a space mark

    Hello

    I received the contents of a manual in raster format, but each line of text ends with a paragraph mark. How to replace the paragraph with a mark space otherwise than by hand?

    In Word, this is pretty easy, but I don't see not any provision for it in the search box on 7.2 Frame.

    Yours,

    Michael F

    ========

    \p = end of paragraph

    \P = beginning of paragraph

    See: Help > keyboard shortcuts > keys for the search and replace

  • How to concatenate the string with a digital command?

    Hello

    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • How to convert the string with numbers in the table of Boolean 2D

    Hello

    I have input a string with comma separated numbers 1,192 (starting at 1).

    This string must be converted to a table 2D-boolean. Each number that appears should be true, not true rest.

    The 2D table consists of 4 times of 0.47 Boolean values.

    1.48--> [0.47] numbers [0]
    49.96--> [0.47] numbers [1]
    Numbers 97.144--> [0.47] [2]
    145.192--> [0.47] numbers [3]

    If a '1, 49, 97 145' input string put all [0] [0.3] true.

    How can it be easy/fast resolved?

    Thanks for help

    Break the string of numbers in a table of numbers.  (Spreasheet String to Array).

    In a loop For, index with each issue of this table.  Use in the range and Coerce to see if it is in the range of numbers.  (You can put this in a loop For as auto good indexing through the ranges).  If it's in the range, then use subset replace table to activate the corresponding item in a real.  If this is not the case, do nothing.  Maintain the table of Boolean in a shift register.

    Repeat this step for each number in your table.

    (What is a class assignment?)

  • How to replace the string "\" on json webservice?

    Hello

    I have problem with this json

    "{\"search_result\":[{\"name\":\"Mall Summarecon\",\"category\":\"BusinessEntity\",\"id\":\"1\"},{\"name\":\"Bamboo Dim Sum\",\"category\":\"BusinessEntity\",\"id\":\"2\"},{\"name\":\"Dimsum Ceker\",\"category\":\"Item\",\"id\":\"1\"}]}"
    

    I want to replace the string "\".

    the json are already working on my app via .cpp file

    I already add json.replace on my qml

    function simpleSearch(response){
            indicator.stop()
            model.clear()
            console.log("Response: "+response)
            var json = JSON.parse(response)
            json = json.replace('\\', ' ') // this is how the way i replace
            if (json == "[]")
                notFound.visible = true
    
            else
                model.append(json.search_result)
        }
    

    but still does not work

    is there a different way to replace it?

    Thank you

    Change your simpleSearchFinished as follows

    ....simpleSearchFinished()
    {
        QNetworkReply *reply = qobject_cast(sender());
        if (!reply->error()){
            QByteArray response = reply->readAll();
            response.replace("\\", "");
            if (response.startsWith("\"")){
                response.remove(0, 1);
            }
            if (response.endsWith("\"")){
                response.remove(response.length()-1, 1);
            }
            emit simpleSearchDone(response);
        }else{
            const int httpCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
            qDebug() << "ErrorCode" << httpCode << endl << \
                    "ErrorString" << reply->errorString();
            emit error(httpCode, reply->errorString());
        }
        reply->deleteLater();
        manager->deleteLater();
    }
    

    and QML

    function simpleSearch(response){
        indicator.stop()
        model.clear()
        var json = JSON.parse(response)
        if (json){ // is VALID/PARSED
            model.append(json.search_result)
        }
    }
    

    As I wrote, it is not a good workaround solution. The best is to send VALID JSON string directly from your server. But it works

  • How to replace Windows 8 with Windows 7 on a Compaq CQ58

    Hello!

    Yesterday, I bought a Compaq CQ58 with Windows 8 on it. I would buy Windows 7 to replace Windows 8 with. But:

    1. it is posible to change 06:52 on my laptop CQ58?

    2 and if so, can I have programs default HP on this subject?

    3 and if so, how?

    When you request support, please provide the model name and product number complete (p/n) of the HP computer in question. HP/Compaq made thousands of computer models. Without this information, it can be difficult, even impossible to help you solve your problem.

    The information requested above are on the bottom of your computer, inside the battery compartment or on the BIOS boot screen. Please see How can I find my model number or product number? for help more to find this information. DO NOT include your serial number. Please enter the product/model information consumer HP Online Support page and post it here for our review.

    1. it is posible to change 06:52 on my laptop CQ58? YES, it is probably possible to install Windows 7 on your computer.

    2 and if so, can I have programs default HP on this subject? NO.

    3 and if so, how?

    WARNING *.

    HP does not recommend installing Windows 7 on a consumer computer comes with Windows 8, and it will support the installation of Windows 7. HP doesn't provide drivers for Windows 7 and the appropriate drivers are not available for the hardware in the computer. In addition, Windows 7 can not take in charge some of the hardware or software designed for the computer.

    Make sure you create your media recovery HP or USB Flash Recovery discs before you edit or change anything.

    You will need to DISABLE "Secure Boot" and ENABLE "Legacy Support" in the "Configuration of the BIOS start-up secure" on the settings page similar to what is shown below, until you try to install Windows 7.

    After you save the changes, the computer will ask you to confirm the changes... Accept the changes by typing the four digit code and press the ENTER"" key.

    If you install from a USB key and see a message of "load a driver - a required CD/DVD drive device is missing", it's because as 'System Configuration' > 'Config USB3.0 in pre-start' is set to 'Enabled '. This should be set to 'Auto '. This should clear up the CD/DVD device is missing.

    In addition, as the hard drive is probably partitioned as TPG, you must start using the internal CD/DVD UEFI or UEFI-Key/key USB to install Windows on a GPT-partitioned disk. Turn on or restart the computer and press "F9" or "ESC", then "F9" when prompted. Select the source of boot UEFI you use and you press "ENTER".

    I suggest using Windows 7 SP1 for the best installation experience. If you need Windows SP1, see 'How to install Windows 7 without the disc' to download and create your own disc of Windows 7 SP1. If the DVD does not start as UEFI, you may need to use a USB Flash drive (can ask "Quick start" DISABLING in BIOS) as the installation media. Please download the Windows 7 USB/DVD download tool to create a Windows 7 SP1 USB Flash drive. Please note that some computers may not recognize a valid active UEFI USB Flash drive if it is formatted in NTFS and may require only a FAT32 formatted USB Flash drive. You should be able to make a FAT32 formatted Windows 7 installation USB Flash drive using Rufus, UNetbootin, Universal USB Installeror WiNToBootic. I like Rufus, because it contains options for 'Plan of GPT partition for UEFI computer' and 'FAT32'.

    From the top...

    (1) turn on the computer and immediately start typing the key "ESC".

    (2) when the MENU is displayed, press "F10".

    3) navigate the BIOS to the "System Configuration", 'USB 3.0 pré-OS Config' and the value 'Auto '.

    4) navigate the BIOS to the "System Configuration", "Startup Options" and "Secure Boot" the value 'Legacy Support' the value "Enabled" and "Disabled"

    5) press "F10" and click "YES" to "Exit Saving Changes".

    (6) computer should restart and display "Change of operating system startup Mode"... type the four digit code, then press "ENTER".

    (7) let Windows 8 boot to the top and put the Windows 7 SP1media in the drive to DVD or a USB port, then logout / stop.

    (8) to turn on the computer and immediately start typing the key "ESC".

    (9) when the MENU is displayed, press the key "F9" and then select the correct boot UEFI source (CD/DVD drive internal, USB drive, CD/DVD, USB Flash drive, etc.). ... Press any key to start the CD/DVD, if prompted.

    (10) select "Language", "time / currency ' and 'Keyboard' settings and then click"Next ".

    11) click on 'install now '... Check "Accept terms" and click "next". Click on "Custom (Advanced)".

    (12) you may need to provide Intel or AMD SATA/RAID drivers at the moment...

    (13) ' where do you want to install Windows 7? Select "Disk / Partition" with "Unallocated space", you created earlier, and then click "next".

    (14) follow all instructions and meet the need. Enter the Windows 7 key when asked.

    (15) download and install the drivers from the support page for your computer.

    After installing the drivers, please post the "Hardware ID" Device Manager (text only) for all other devices missing or unknown as illustrated in the example below.

    If you have any other questions, feel free to ask.

    Please click the 'Thumbs Up' white LAURELS to show your appreciation

  • Replace the string with the formatted text

    Hello all - I'm back to my beloved project...

    I want to replace a string by a TextSelction (formatted text) and began with the famous feature of Jang FindAndReplaceString.
    Since my replacement comes from another document (sourceDoc), I edited to targetDoc activeDoc and introduced a second document (sourceDoc).
    The replacePara actually comes from a stone where he had been placed to avoid switch backwards between the documents in a book (where to find and replace) and source documents. In another function, I learned that information on the table requires the sourceDoc must remain open.

    • Of course, everything works fine until I want to insert the replacelement:
      erase line 26 is the string
    • Given that I do not insert a string, I skip lines 28 and 29 and try try line 30
    • On line 30 DocumentSource is Document object and replacePare object TextSelection. However, sourceDoc.replacePara is not set and
    • (as a result?) line 31 past the current contents of the Clipboard.

    Of course, there is a fog around me... and I need some sunshine.

    function FindAndReplacePara (targetDoc, findString, sourceDoc, replacePara, loopMax) {
      var tr = new TextRange();
      var restoreTR, frame = 0, loopCounter = 0, replacementCounter = 0;
      var findParams = new PropVals();
      var firstPgf = targetDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
      
      tr.beg.obj = tr.end.obj = firstPgf;             //  set up the starting text range as the very beginning
      tr.beg.offset = tr.end.offset = 0;              // of the flow. We'll move straight from beginning to end.
      trSaved = tr                                    // to come back after work
    
      findParams = AllocatePropVals(2);
      
      findParams[0].propIdent.num = Constants.FS_FindText;
      findParams[0].propVal.valType = Constants.FT_String;
      findParams[0].propVal.sval = findString;
      
      findParams[1].propIdent.num = Constants.FS_FindCustomizationFlags;
      findParams[1].propVal.valType = Constants.FT_Integer;
      findParams[1].propVal.ival = Constants.FF_FIND_CONSIDER_CASE;
    
      FA_errno = Constants.FE_Success;                // errno global, to be used to track the progress of the find and replace
      tr = targetDoc.Find(tr.beg, findParams);        // and do an initial find to get started.
      
      while(FA_errno === Constants.FE_Success && loopCounter++ < 2*loopMax) { //find and replace loop as long as we keep finding
        targetDoc.TextSelection = tr;                 // set up the text range to clear the original text
        targetDoc.Clear(0);                           // clear it
        
    //    targetDoc.AddText(tr.beg, replacePara);       // insert the new text at the original beginning of the text range
    //    tr.beg.offset += replacePara.length;          //  lets jimmy the text range in memory to place it directly after
        targetDoc.TextSelection = sourceDoc.replacePara;        // paste the whole replacement paragraph
        targetDoc.Paste (0);                          // <-- Current contents of clipboard is pasted !!!!
        if(FA_errno === Constants.FE_Success) {       // increment our return counter
          replacementCounter++;
        }
        FA_errno = Constants.FE_Success;              // ...  find the next instance. We'll reset FA_errno again just in case
        tr = targetDoc.Find(tr.beg, findParams);      // something screwy happened while we were replacing text.
      }
      targetDoc.ScrollToText(trSaved);                // we're done. Restore the document to it's original area of display
      return replacementCounter;
    } // --- end FindAndReplacePara
    

    Hi Klaus,

    Thanks for the explanation. I remember something like that GetTabRange of the way back. You have been quite patient and persistent with this project, indeed.

    So, as we are dealing with ranges of text here, I think that the only simple approach is to perform a copy and paste. There is no way to save a 'formatted' in a variable. The only super precise way would be to get a data structure of each text range TextItems in the sourceDoc, then meticulously recreate every element of the targetDoc. It would be very complicated, I think, so copy and paste seems the most logical. I wonder, though, if Miss me something, because I think that maybe you would have tried already so yes (?)

    In any case, I would do something like that, from line 30 of your original code sample (code untested here):

    App. ActiveDoc = sourceDoc;

    sourceDoc.TextSelection = replacePara;

    sourceDoc.Copy (0);

    App. ActiveDoc = targetDoc;

    targetDoc.Paste (0);

    ... etc.

    Does make sense, or am I barking the wrong tree, as they say?

    Russ

  • How to use the String with an external dispatchEvent event.target.name?

    ... I hope that the question of the title makes sense...

    On my stage, I have an external SWF loaded with a button. When you click the button dispatches the main event scene.

    On the main stage a listener can load a SWF it in a magazine called Gallery.

    The charger of the Gallery is also shared by the buttons on the main stage, who use the event.target.name chain to appeal to sovereign wealth funds with corresponding names.

    I use tweens to fade and, in the content of the Gallery when a key is pressed.

    --

    Loading of the FSV worked until I tried to create a universal function for the dispatchEvent buttons...

    The problem I have is that I don't know how to set the string to indicate to the newSWFRequest where the SWF file when triggered by external buttons.

    (I maybe do this wrong... but thought that the best way to load a SWF on the main stage from an external SWF was using dispatchEvent?)

    My code raises the event and the charger of the Gallery Faints, but then it does not find the new SWF:

    Error #2044: Unmanaged by the IOErrorEvent:. Text = Error #2035: URL not found.

    Please can someone help me understand how to make the point in the chain in the right direction? (I think that the errors only are in bold below)

    Code:

    var myTweenIn2:Tween;

    var myTweenOut2:Tween;

    var nextLoadS2:String;

    Listening external inclinometer shipped external event

    addEventListener ("contactStage", btnClickExtrnl);

    function btnClickExtrnl(e:Event):void {}

    nextLoadS2 =?

    myTweenOut2 = new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);

    myTweenOut2.addEventListener (TweenEvent.MOTION_FINISH, tweenOutCompleteF2);

    }

    Function universal BTNS

    function tweenOutCompleteF2(e:TweenEvent) {}

    myTweenOut2.removeEventListener (TweenEvent.MOTION_FINISH, tweenOutCompleteF2);

    myTweenOut2 = null;

    var newSWFRequest:URLRequest = new URLRequest ("SWFs /" + nextLoadS2 + ".swf");

    myTweenIn2 = new Tween (Gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);

    Gallery.Load (newSWFRequest);

    Gallery.x = Xpos;

    Gallery.y = Ypos;

    }

    Thank you.

    If this code is on the timeline of a child of the main timeline of your external swf add parent 3rd in two lines with parent.parent.

  • How to convert the string with numbers in U8 with ascii

    Hello

    I have a string with only numbers 0. 9 paper.

    Now, I want to convert to table-U8.

    He works here, but now the problem: How can I change each character to its ascii value?

    Example:

    entry: 123 (string)

    output: x 31, x 32, x 33 (U8-array)

    Thanks for the help

    It's very easy

    String to Byte Array Function
    Have the Palette: string/array/path Conversion functions

    Converts a string to an array of unsigned bytes. Each byte in the array has the ASCII value of the character corresponding to the string.

  • How to replace one table with another?

    I need to replace one table with another. Both tables have the same structure, primary keys, indexes, constraints, but different data (about 50 million records).
    I would like to make this replacement in line, with no passage of database in offline mode.
    There is no clause CREATE or REPLACE TABLE in Oracle unfortunely.
    I could use just DROP and ALTER TABLE RENAME instructions, but it is necessary that a user receive message error "table or view does not exist. It may be possible to block incoming requests at the moment, while old and new droppping table rename are performed?

    Thanks in advance.

    Hi again!

    You can detect normal users with session sessions $ v. A session of a normal user has a username (username of the column). Systemsessions PMON and SMON have no user name. So, you can use the following query to detect sessions, you need to kill:

    SELECT sid, serial#, username
    FROM   v$session
    WHERE type NOT LIKE 'BACKGROUND';
    

    concerning

  • How to replace a number with a string

    Hello

    I am trying to replace the value + 1.23 in 1 P 23 and if it is negative - 0.23 in 0N23, can someone help me with this?

    Check the fixing.

  • How to replace the iPhone with iCloud contacts contacts

    I see a lot on the other hand... but I need help.  I spent hours on my reductive duplicates of MAC (2-3 each) and out Hung old addresses, etc..  I've narrowed my list of contacts from 1200 to 458.  Once I did, I have archived my new list of contacts "just in case."  When I go in iCloud on my computer, I see 458 contacts.  Large.  However, my iPad and iPhone are always a mess.  I thought that this was happening in iCloud would replace the junk on my devices.  I have read articles that said disable contacts in iCloud and it will ask you what you want to do with contacts - delete.  Yes, I did.  It has eliminated about 90 contacts and that's it.  Also, I went to all my e-mail and accounts disabled using contacts from gmail, yahoo, outlook etc.  Who does nothing either.

    Summary: What's in my account iCloud, 458 contacts, is correct.  Now, how the hell do I clean my iphone and ipad and load these 458 contacting them and get rid of the 1200-1500 in each device now?  Waaaah.   Very frustrating that there is not a global deletion that I can find.

    Please help a rookie.  MM

    Turn on the iCloud contacts for all devices

  • Pavilion dv6700 CTO: how to replace the drive with SSD hard dv6700

    Am trying to replace has no HD with SATA SSD, but the pins are different (flat LANDSCAPE on the SSD and vertical on the original drive). There is no information on the removal of the black connector. How can I get the new drive to adapt?

    The dv6700 uses a piece of plastic connector via the standard SATA connections on the hard drive. It looks like the part of the hard drive but is a separate room.

    See the standard locations of SATA connection on the bottom, then the pins on the top brass? Carefully remove this piece of plastic from the old hard drive and the place are good go on the SSD and you.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • How to replace the HDD with SSD for Inspiron 15R 5521?

    Hello

    I have the Dell Inspiron 15R 5521 Intel i7 with Windows 8 is installed. I would like to replace the hard drive with the Samsung SSD 840 EVO series.

    http://www.Amazon.com/Samsung-Electronics-Evo-Series-2-5-inch-MZ-7TE1T0BW/DP/B00E3W16OU/ref=cm_cd_al_qh_dp_t

    First of all, this SSD will be compatible with my laptop? Second, I don't know how to install the Windows 8 and all the necessary drivers for this laptop works again.

    I have very little knowledge of operating system installation. Can someone help me with step by step instructions please?

    Thank you.

    Hi Daniel Hong,.

    This drive should work fine. I have a link below an operating system for your reference installation guide.

  • GREP: How to replace a paragraph with a manual line break break?

    Hello.

    I want to replace a few paragraph breaks (Enter) with manual line breaks (SHIFT + ENTER).

    How do I do that?

    Any help would be appreciated.

    GREP codes for all functions and special characters can be found in the help: help InDesign | Find/replace

    In this case, you do not want to change

    \r

    TO

    \n

    Be aware that this will stick together, paragraphs with all the consequences for its paragraph styles. I rarely do this (and then only unformatted text!) that I don't know yet if it will apply the above the following paragraph paragraph style, or vice versa.

Maybe you are looking for

  • Default value of width of column in the finder

    For Finder column, the column in a new window widths are often too narrow and I have to resize to display the full name of each file.  is there a way to change the default column width?

  • MSN Video Player in media library does not not after update

    Until recently I could look at the MSN Video Player and select in all programs offered. Just recently when I clicked on the play on a program to get a "Internet TV update" screen. I checked the update check box and press. A small screen shows very qu

  • Satellite P100 - reduced Audio level Possible

    I have a TOSHIBA Satellite P100 PSPAAE-01D00UENSystem serial number: 17172416W, and until recently had no problem with my sound levels. About a week ago, without known alterations to my system, no new facilities application and any updated drivers, I

  • USb device not recognized / Power surge on hub port

    I don't have the slightest idea what happened here, but when I plug my defy in a PC all I get is 'USB device not recognized '. and I can't connect to usingf a P.C. Ive tried to re-satring the phone and the PC, ive tried also in another PC and it did

  • OfficeJet Pro 8620: Print envelopes all other white

    Printing envelopes a database of merger and merge Word using the standard envelopes #10 business. My envelopes print fine, but any other envelope comes out blank. Makes me constantly short of envelopes in the tray, then I have to sift through to shoo