Several characters replace without recursion?

Hello

I need to know if it is possible to replace several characters at once without the recursive function calls.

for example:

Replace (replace ('source1', '&',' $'),'-',' _')

(1) is there a better way to achieve this?
(2) if I write a P/SQL function for this, it will be better or worse (performance)?

Thank you!!!

Edited by: NIghtbeat on July 30, 2010 16:59

You can use the translation:

SQL> select translate('test#@@%%^^1234','x(#|@|\^|%)','x') from dual
/
TRANSLATE('TEST#@@%%^^1234','X(#|@|\^|%)','X')
----------------------------------------------
test1234  

or

SQL> select translate('tes&$9-8$&-&&','x&-','x$_') from dual
/
TRANSLATE('TES&$9-8$&-&&','X&-','X$_')
--------------------------------------
tes$$9_8$$_$$  

Published by: michaels2 on July 30, 2010 13:38

Tags: Database

Similar Questions

  • IntelliType Macro for several characters

    I want to type a few characters by pressing a shortcut key combination, for example, Ctrl-Shift-O to write "(~"(sans les guillemets). ")" There are one number of others.

    I downloaded Intellitype and Microsoft keyboard for this purpose. However, I have not found the ability to do the above. If there is a way, would you please give me or direct me to instructions to make that happen, or recommend another solution.

    Without knowing what keyboard you use-
    Many keyboards have 'shortcut' capabilities, but for the macro, you need to able to use the macro keyboard. They usually have x number of macro keys dedicated.
    Keyboards announced that 'game' keyboards often have five or more macro keys.

    .

  • REGEXP_REPLACE with several chr() replacements...

    All,

    I try to use the regexp_replace function to force the replacement of a group of special characters in a string. Is this possible in the function to have a mapping as a substitute the following text:
    Chr (150) with '-'
    Chr (132) with "'"
    Chr (146) with "'

    I know that I can wrap a function replace all the terms, but I was wondering if I could use a feature unique regexp_replace to do the same. Also, I must cross a string containing cr, lf,... IE multiline.

    Thanks in advance,
    Tom

    Use TRANSLATE

    SQL> select translate(chr(150)||chr(132)||chr(146),chr(150)||chr(132)||chr(146),'-";') from dual
      2  /
    
    TRA
    ---
    -";
    
  • iPhone more than 7 replaced without service problem

    Hi new to the forum here and today I just got my replacement of Verizon iPhone 7 + 256 GB black by apple after going in the Apple Store on September 26, not showing my no problem related to the service and had changed through prior Verizon sim card. Engineering technology recognized the problem talked to rep senior and told to do an "Exchange of device' for me, since the phone is 9 days. Noticed that I'm not the only one to have this problem more but now I regret having my phone replaced. I had it for 9 days and full retail paid for it now having the same problem as the first phone and my regrets about the replacement is if the phone is brand new or "certified refurbished" my replacement of the unit was commissioned on 26 and he got today the 29th engineering I talked to said Monday he's going to be new, but the lady who gave me the phone today said apple doesn't should not refurbished phone at nine, but "certified" I worry that since probably got a second hand phone after paying for a new or replacement is actually a new phone? He came in a slim box and the phone had the plastic top cover...

    It is difficult to discern what your question is actually, maybe you can help with that.

  • How to reload Vista HP after HARD drive replaced without a Vista CD

    I bought a laptop Lenovo 3000 G410 with Vista HP (English version) in Hong Kong and then retired and moved to France.

    My computer has now failed because of a faulty HARD drive and a local agent has installed a new HARD drive and a version of Windows 7 in French.

    I don't find it easy to use a French operating system and prefer to completely re - install Vista.

    I don't have a Vista CD to restore the operating system, as this was not supplied with the computer

    Where can I get a replacement for Vista English drive?

    Thanks in advance

    If you do not install disks and Windows is preinstalled with the computer:

    Contact the OEM computer manufacturer and ask them to send you an installation to your computer disk - they may charge a small fee. Contact information for the manufacturer of your computer can be found here:

    http://support.Microsoft.com/GP/oemphone/

  • Can I use several characters in the Adobe character animation?

    Thank you Adobe! Since I have a long history as a Flash animator, Adobe character animation blows my mind!

    Can I use more than one character to animate in a story?

    What amazing a product! Thank you Adobe!

    Yes. Everything that is selected in the timeline panel - a character, another character, as well at the same time, etc. - is controlled by the webcam. You can record/select each one individually to make the scenes. Or you can export two separate characters and combine them into something like After Effects, which is what I did for this cartoon:

  • Please help me to download the 13 elements, I all relevant issues and have tried several times but without success.

    PLEASE HELP ME TO DOWNLOAD ITEMS 13, I ALL RELEVANT ISSUES AND HAVE TRIED SEVERAL TIMES.

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If he continues to not try to use a different browser.

    PES 10, 11, 12, 13 - https://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-downloads.html

    PE 10, 11, 12, 13 - https://helpx.adobe.com/premiere-elements/kb/premiere-elements-downloads.html

    You can also download the demo version of the software through the page linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html

  • Is it possible to group several columns individually without the help of the union?

    Hi, if I have a table with a column numebr I want group, for example, sex, nationality, age and I want to present a summary of this kind:

    County group
    10 male
    23 women
    British 19
    14 Irish
    18 10

    ...
    etc.

    Or even better:
    County group
    10 men
    Sex-wife 23
    British Nationaility 19
    14 Irish
    10 to 18 years

    Is it possible without using loads of trade unions? I just want to do the best way and most effective the table involved has > 100 million lines.

    Thank you very much

    Jen :)

    Hey, Jen,

    Here is another way, which could be faster because it does not unpivot data:

    SELECT    CASE  0
               WHEN  GROUPING (gender)       THEN  'Gender'
               WHEN  GROUPING (nationality)  THEN 'Nationality'
               WHEN  GROUPING (age)         THEN 'Age'
           END                    AS label
    ,       COALESCE ( gender
                   , nationality
                 , TO_CHAR (age)
                 )           AS val
    ,       COUNT (*)          AS cnt
    FROM       t
    GROUP BY  GROUPING SETS ( (gender)
                              , (nationality)
                   , (age)
                   )
    ORDER BY  label
    ,            val
    ;
    

    Output, using the data of knapen:

    LABEL           VAL                    CNT
    --------------- --------------- ----------
    Age             25                       2
    Age             30                       2
    Age             40                       2
    Age             45                       2
    Age             50                       2
    Gender          F                        5
    Gender          M                        5
    Nationality     BRITISH                  4
    Nationality     INDIAN                   3
    Nationality     IRISH                    3
    
  • Apply the style nested up to one of several characters

    I d-i-d try this old College, but maybe I don't know the right place or I am limited in nested Style in style GREP.

    I have a number any unpredictable predictable characters I want to apply a style CH "up to".

    Example 1: The Club of InDesign in the Future meeting, 15:30: here are some examples of text...  Here is some sample text...  Here are some examples of text--in this case, "up to" colon
    Example 2: The Club of InDesign in the Future meeting, 15:30 - here is an example of text...  Here is some sample text...  Here are some examples of text--in this case, "until" space hyphen

    Example 3: The Club of InDesign in the Future meeting, 15:30 - here is an example of text...  Here is some sample text...  Here are some examples of text--in this case, "until" space hyphen hyphen

    Example 4: The Club of InDesign in the Future meeting, 15:30, here is an example of text...  Here is some sample text...  Here is some example text--in this case, "up to" any character (comma) [of course, there is an argument in this one]

    There are 5-6. predictable samples.  But nested Styles stacked on each other tends to "BOLD" of the whole paragraph.  A js script would be more applicable here, or do you think the GREP style work?  I missed (even with my books on GREP) to any type of nail model.

    How do you tell the difference between the first and the second comma in the meeting, 15:30? They are all two followed by a space. PM maybe a clue? Then ^. +? pm\s [:-]-? might work.

    Peter

  • Suddenly cannot drag objects... tried several possible solutions without success so far.

    All of a sudden I can't drag objects in an InDesign document (well, I guess it's ANY document. I've only tested a few). I can drag handles/corners to resize an object; Can I move an object with arrow keys; I can move objects using the object > transform > move; but I can't drag anything with the mouse/trackpad.

    This is the case with all objects of all the documents that I tested (text-objects) and objects in the image. I tried to use a trackpad and mouse. I checked to make sure that the objects locked or not anchored. I trashed preferences. Still no luck.

    I use InDesign CS4 on Mac Snow Leopard (10.6.8). I better touch tool installed - with the trackpad, I did all actions that are specific to InDesign, but with the mouse, I do to turn off two fingers scrolling in the application. The trackpad is the only new thing on the computer...

    Any ideas?

    First thing I would try is to uninstall the best tool to touch.

    And you say you trashed the prefs, but I like to be sure that you really did a thorough job. For ID there are two files that need to be replaced, and they live in different folders, so sometimes users do half the work. Please see replace your preferences

  • all characters replaced by square with two zeros on the top and a number below, works ok when uninstall it, reload and start the first time, after that the problem reappears. sometimes works first time to reboot. IE and Chrome ok, light running. v 7, wind

    Set up of fonts etc seems to be ok, still had problems with plug-ins disabled

    Try to set the pref gfx.font_rendering.directwrite.use_gdi_table_loading false on the topic: config page.

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

    • Use the filter at the top bar of the on: page config to more easily spot a preference.
    • Preferences that have changed also show "BOLD" (user set).
    • Preferences can be reset to the default value using the context menu if they are set of users
    • Preferences can be changed via the context menu: Edit (string or integer) or toggle (Boolean)
  • VISA read message with several characters of endpoint

    Hi, I use VISA to read data from my camera. After writing, the device will always send a sequence of post 'OK' CR LF, followed by the data.

    If I activate the stop character, my program will never read 'OK '. However I can't set it to false and set the number of bytes, because the number of bytes varies.

    Is there a solution to this problem? Perhaps, somehow ignore the first character of termination?

    Fine thanks

    Ben

    What is the stop for the actual character?

    Looks like you have found

    OK CR LF

    Your data here...   LF

    Just that line break is your termination character.  Don't forget to do readings of TWO VISAS.  One to get the OK, the second to get the data.

  • Cursor to delay when moving the mouse / when entering, the cursor then jumps to new post or leave aside several characters typed.

    I have a desktop Dell Inspiron s. Windows 32-bit Vista, Mcafee internet security 2009, Office home and Student 2007.
    A month ago, I crossed her uninstall, reinstall office, mcafee, windows updates. The problem disappeared about a week and now he's back. Windows update is daily trying to install "microsoft xml 4.0 basic services security update service pack 2: kb954430, don't know if that part of the problem?

    Hello Georgeous

    Thank you for using the Microsoft Answers Forums!

    I would like to ask you a few questions to help focus in the right direction:

    Are there other specific details that you can provide that will help us understand and solve your problem?

    If this KB954430 is not installed on your computer and prompts you for every day then it must go corrupt. I suggest that you follow these steps and check if it works.

    Download the update program "msxml4-KB936181 - enu.exe" on the Microsoft website, no Windows Update.

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=021E12F5-CB46-43DF-A2B8-185639BA2807&displaylang=en

    Run the program and delete all.

    Restart, and then rerun the program again to install it.

    Then, run the file of Windows Update for "Update for Microsoft XML Core Services 4.0 Service Pack 2 security".

    Restart the computer.

    Now, check if you get the same problem again.

    After the return.

    All the best!

    Thank you and best regards,

    R uma - Microsoft technical support.

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

  • Animate the text over several characters range?

    Play with the AE text animation tools that are pretty cool.

    However, I have difficulties to get exactly what I want to happen, happen.

    For reasons of simplicities, lets say that my text is ABCDEFG and I want each letter to the scale zero, from the left and moving on toward the right.  Well, I got that.

    But baisically AE not the complete scale from 0 to 100 in A then B etc.  I want to be able to adjust the range so has starts, then B starts, then begins to C , then D begins, and so only has ends.

    Looks like a simple enough concept, but I don't understand how to do it.

    ?

    Thank you

    You'll want to change the shape of the animation.

    Open advanced under the host options, choose ramp upwards to the form and then animate the offset.

  • Replace multiple characters to unique character

    Hi friends,

    I would replace several characters of a string to a single character. The character may be a vertical bar (|) or a tilde (~).

    For example ' |. ' ASDF | 123 | XYZ | "should be replaced by" asdf ". 123 | XYZ ".

    I use Oracle 11 g 2.

    Thanks in advance!

    Without regexp

    with testdata until)
    Select ' | ASDF | 123 | xyz |'union str double all the
    Select ' asdf | 123 | XYZ | "of all the double union
    Select ' | ASDF | 123 | XYZ | "double
    )

    Select
    trim (both ' |' to)
    replace)
    replace)
    Replace (str,'|) «, » |'|| Chr (0))
    , chr (0) |' | '
    )
    , chr (0)
    )
    ) str
    of testdata

    STR

    "asdf". 123 | XYZ ".

    "asdf". 123 | XYZ ".

    "asdf". 123 | XYZ ".

    with regexp

    with testdata until)
    Select ' | ASDF | 123 | xyz |'union str double all the
    Select ' asdf | 123 | XYZ | "of all the double union
    Select ' | ASDF | 123 | XYZ | "double
    )

    Select
    trim (both ' |' to)
    regexp_replace)
    Str
    ,'\|+'
    ,'|'
    )
    ) str
    of testdata

    STR

    "asdf". 123 | XYZ ".

    "asdf". 123 | XYZ ".

    "asdf". 123 | XYZ ".

    Post edited by: regexp added chris227

Maybe you are looking for