Function DEFINITION, remove the chain alpha characters

I'm on 11g.

I need to remove the alpha of a string characters, leaving only numbers, but I get unexpected results:
SQL > SELECT TRANSLATE ('3N', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', NULL) a FROM DUAL;
A
-

I thought that this would leave 3 of the 3N, but it returns an empty string. For my application, the string "3N" could be any length, will contain only letters and numbers and letters will always come at the end, but there might be more than one letter
VALID INPUT samples:
4
25
11F
361NG
8ABC

Is there a better way?

You must give a valid replacement at least, and then the rest will be replaced with null as the address:

SELECT TRANSLATE('3N', '1ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1') a FROM DUAL;

Published by: chris227 on 07.02.2013 08:37
Sorry, I forgot the 1 in the second parameter

Tags: Database

Similar Questions

  • I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    Example:

    Text Example.JPG

    I need to remove these numbers PXXXXXX. Leaving the other characters.

    Thank you

    Bob

    A normal 'substring' is what you're looking for.

    For a formula of the column in the response criteria tab:

    SUBSTRING ("YourPresTable". "YourPresColumn" OF 9)

    To make the RPD and the workload of shipping off the coast to the database rather than forcing the work on the server of the OBI or presentation:

    Substring ("01 - Sample App Data (ORCL)" ".." ") "" "BISAMPLE '." " D10 product (dynamic table)". ("' Prod_Dsc ' 9)

  • How can I remove the first 3 characters of the files?

    I'm using the bridge for a while and rename the lot

    How can I rename to remove the first 3 characters of the files?

    (these are numbers)

  • How to remove the jump line, characters and past of a table column?

    HII,

    I m using 4 Apex.
    I m find the problem by removing the line break, characters and captures existing data in the column of the table.


    thnx in advance

    for example

    replace(replace(l_string_var, chr(10)),chr(13))
    

    Best regards
    Marko

    Published by: Marko Goricki, January 17, 2011 10:52

  • 9i: remove the unicode control characters

    Hello!

    is it possible (how?) to remove the unicode control characters (like U + 2415, SYMBOL for NEGATIVE ACKNOWLEDGE) of a column of data in oracle 9i?

    Best regards
    Christian
    UPDATE table SET column=TRANSLATE(column,UNISTR('x\2415'),'x');
    

    -Sergiusz

  • Remove the file name characters when exporting to file

    Hi all

    I worked with Silly-V , which has been extremely useful in creating a script to automate creating files in Illustrator.

    What I need help with now is the ability to add in this script, the ability to remove "x #" character of a filename on export. This would be ideal, as it will completely automate what I did by hand for months.

    The current script, that we have put in place takes generally, which would take me about 1 minute per file and it has reduced to 10 seconds. Translate this in the whole of the need to treat roughly 800-1 000 files, and you can see where the time invested is decreased significantly.

    The last piece of the puzzle is the removal of characters from ONE of the two files that are created through this script.

    First of all, this is the current script. It seems to work perfectly for what I ask it to do.

    #target illustrator-19  
    function test(){  
      
      
      var folder_1 = Folder("~/Desktop/Header CAD");  
      var folder_2 = Folder("~/Desktop/Clean CAD");  
        
      app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;  
        
      function revealAllLayers(doc) {    
          for (var i = doc.layers.length - 1; i >= 0; i--) {    
              doc.layers[i].visible = true;    
          }    
      };    
      
      
      
      
      function hideLayer(doc, name) {    
          doc.layers.getByName(name).visible = false;    
      };    
      
      
      
      
      function exportMyPng(dest, doc, props) {    
          if(props.hasOwnProperty("antiAliasing")){    
            switch(props.antiAliasing){    
              case "ARTOPTIMIZED" : {    
                  app.preferences.setIntegerPreference("plugin/PNGFileFormat/AntiAlias", 1);    
                  break;      
              }    
              default : {    
                  break;    
              }    
            }    
          }    
          var pngOpts = new ImageCaptureOptions();   
          pngOpts.antiAliasing = true;   
          for (var all in props) {    
              if (pngOpts.hasOwnProperty(all) && all != "antiAliasing") {    
                  pngOpts[all] = props[all];    
              }    
          }    
          doc.imageCapture(File(dest + "/" + doc.name.replace(/\.\w+$/, props.extraStuff + ".png")), doc.visibleBounds, pngOpts);    
      };    
      
      
      
      
      var doc = app.activeDocument;    
      revealAllLayers(doc);    
      hideLayer(doc, "Materials");    
      hideLayer(doc, "Detail Artwork");    
      exportMyPng(folder_1, doc, {    
          transparency: false,    
          antiAliasing: "ARTOPTIMIZED",    
          resolution: 300,    
          extraStuff: "_header"
      });    
      
      
    
    
        
      hideLayer(doc, "Header");    
      exportMyPng(folder_2, doc, {    
          transparency: false,    
          antiAliasing: "ARTOPTIMIZED",    
          resolution: 300,    
          extraStuff: ""
      });    
      
      
      app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);  
      
      
    };       
    test(); 
    
    test(); 
    

    I found the program Name Mangler done an exceptional job of the completion of the task of renaming. Here's a screenshot of what I'm asking for looks like with this program.

    Screen Shot 2016-08-01 at 3.18.45 PM.png

    My ultimate goal is to be able to integrate this unique Name Mangler feature the existing script I posted above. Now, the problem is that I need ONLY to assign the file created by the section of the lines 66-71. As you can see, I need to remove the file name starting at the index of 14 characters.

    Is it possible and something that anyone can help with?

    Thank you in advance!

    Brooks

    Whew busy days!

    Well, I got this here:

    #target illustrator
    function test(){   
    
      var folder_1 = Folder("~/Desktop/Header CAD");
      var folder_2 = Folder("~/Desktop/Clean CAD");   
    
      app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;   
    
      function revealAllLayers(doc) {
          for (var i = doc.layers.length - 1; i >= 0; i--) {
              doc.layers[i].visible = true;
          }
      };     
    
      function hideLayer(doc, name) {
          doc.layers.getByName(name).visible = false;
      };     
    
      function exportMyPng(dest, doc, props) {
          if(props.hasOwnProperty("antiAliasing")){
            switch(props.antiAliasing){
              case "ARTOPTIMIZED" : {
                  app.preferences.setIntegerPreference("plugin/PNGFileFormat/AntiAlias", 1);
                  break;
              }
              default : {
                  break;
              }
            }
          }
          var pngOpts = new ImageCaptureOptions();
          pngOpts.antiAliasing = true;
          for (var all in props) {
              if (pngOpts.hasOwnProperty(all) && all != "antiAliasing") {
                  pngOpts[all] = props[all];
              }
          }
          doc.imageCapture(File(dest + "/" + doc.name.replace(/\.\w+$/, props.extraStuff + ".png").substr(props.charsOffStart)), doc.visibleBounds, pngOpts);
      };     
    
      var doc = app.activeDocument;
      revealAllLayers(doc);
      hideLayer(doc, "Materials");
      hideLayer(doc, "Detail Artwork");
      exportMyPng(folder_1, doc, {
          transparency: false,
          antiAliasing: "ARTOPTIMIZED",
          resolution: 300,
          extraStuff: "_header",
          charsOffStart: 0
      });     
    
      hideLayer(doc, "Header");
      exportMyPng(folder_2, doc, {
          transparency: false,
          antiAliasing: "ARTOPTIMIZED",
          resolution: 300,
          extraStuff: "",
          charsOffStart: 14
      });
      app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);   
    
    };
    test();
    

    This one has a new parameter "charsOffStart" that you have to stick in your two-functions for the economy, and it will be lop however much from character now!

  • How to remove the first few characters of a string of liquid

    I would like to delete the first three characters of a string of liquid. The question is how.

    If I use the markup according to liquid when I know what are the first characters

    {{it. {{["Estate status'] | strip_html | remove_first:"11."}}

    It will remove the 11 characters.

    But if I don't know what are the first characters, this markup can I use to get "RID" of the first three characters?

    I tried 'split' and 'slice', but it must always know what characters to split or slice.

    Thanks for any help.

    Kind regards

    Carla

    Assign a value into slices and you can have table data that you can get out.

  • Function to remove the HTML of all THE

    I have a field to retrieve from the primavera which is the BLOB format in the database and pump it in a view.

    We injected codes to remove HTML tags such as <>/ and some other stuff ASCII (obtained using a developer on ACII it so I don't know how to explain to forgive me), but we have still some surprises like & nbsp and & amp appearing according to what is entered in the primavera.

    How to remove all THE html codes? Currently, the code looks like this:

    Replace (Replace (REGEXP_REPLACE (utl_raw.cast_to_varchar2 (DBMS_LOB.substr (TM.task_memo)), ' < [^ >] + > '), Chr (13), "), Chr (10),") and the stories

    Thank you.

    Your home, remember to mark as answer.

    If you look at the string in the database, you can use dump to see which character is at the end of the line.

    In this example, I placed a chr (0) at the end of the chain to show:

    Decimal:
    Select dump ('test' |) Chr (0), 8) twice;

    Output: Type = 1 Len = 8: 164,145,163,164,151,156,147,0

    Spell:
    Select dump ('test' |) Chr (0), 16) double;

    Output: Type = 1 Len = 8: 74,65,73,74,69, 6th, 67, 0

    Published by: specdev on August 6, 2012 05:08

    Has answered without receive useful or correct answer points :-(but make us someone happy today :-)

  • update query - remove the last 3 characters of field3 of all records

    I have a table full of details of the vehicle. A field contains a part number. for example.
    DR4050 (K)

    I need to remove the (K) of each part in the table number

    Can someone explain how to do this?

    Thank you very much. I took your advice and check the string of MySQL functions. This is the statement that did the trick for me:

    Update transmission_copy
    Set outer_cv_joint_left_side = replace (outer_cv_joint_left_side, "(K)", "");

  • How to remove the first 11 characters of a string

    With the help of ' XML Publusher Desktop / generator model for Word / 5.6 Build 45'

    I use XML Publisher. With the help of a RTF model, to generate purchase orders by email of the purchase of the Oracle.

    The fields are drawn from the XML code generated by Oracle.

    One of the fields is the place of delivery Description field.

    Will appear in the report as follows:

    * & lt;? SHIP_TO_LOCATION_NAME? & gt; *

    When I attach a test XML file in Word and view the output, one of my test case returns a description of the site:

    DON'T code USE County Hall of Global location

    What I have to do is to remove the * DO NOT USE * according to the description of the location.

    I could do is a Find / Replace, or a substring to ignore the first 11 characters from the string. But I don't know how to do it.

    Any help would be much appreciated, because it is a production problem that is causing a bit of a small problem for us!

    Thank you very much.

    Hello
    Maybe you know this syntax :)

    Rahul

  • Remove the chain if the match format of other print the same string

    Hello

    I had posted a question earlier before in the forum in lieu of the chain

    > >Delete Sting

    My requirement is user will pass the string that is mentioned below

    > > "SUCCESS [FID__6a377428_137b946b364__767b].

    It should return > > FID__6a377428_137b946b364__767b

    If the user only the > > FID__6a377428_137b946b364__767b

    It should not replace anything, to just return the same string

    logic for this query is it should return the string anything between [] another user that never enter it should return.

    Please suggest me

    I use this query, that it works fine but the user spends FID__6a377428_137b946b364__767b with ouy [] must return the same

    SELECT col1 FROM
    (
    with the data as
    (
    Select trim ('FID_28eff73b_125a3e651e2__7c26') double NECK
    )
    SELECT TRIM ('] ' OF REGEXP_SUBSTR (COL, ' [^ \] +', 1, 2])) COL1
    extracted data);

    Thank you
    Sudhir

    Published by: Sudhir_Meru on June 29, 2012 21:14

    This will work with the sample you provided...

    SQL> with t as
      2  (select 'SUCCESS[FID_28eff73b_125a3e651e2__7d76]' str from dual union all
      3   select '[FID_28eff73b_125a3e651e2__7d76]' str from dual union all
      4   select 'FID_28eff73b_125a3e651e2__7d76' str from dual )
      5  select str,case when str like '%[%]%'
      6                  then regexp_replace(str,'([^\[]?+\[)([^]]+)(].*?)','\2')
      7              else str
      8         end output
      9  from t;
    
    STR                                      OUTPUT
    ---------------------------------------- ----------------------------------------
    SUCCESS[FID_28eff73b_125a3e651e2__7d76]  FID_28eff73b_125a3e651e2__7d76
    [FID_28eff73b_125a3e651e2__7d76]         FID_28eff73b_125a3e651e2__7d76
    FID_28eff73b_125a3e651e2__7d76           FID_28eff73b_125a3e651e2__7d76
    
  • Script to remove the first few characters of a PDF file name?

    I know it should be easy, but I'm not a coder and don't have many opportunities to write scripts.  I hope it's like a second request two anyone out there.  All I want to do is point a script in a PDF file that will review the file name, cut the first two characters of the file name and save the original file again.  I need to do this about 400 PDF documents on a recurring basis, hence the need for a script.  Thus, for example, if I have a C:/temp/myFile.pdf file, I would the script to rename the file to just "file.pdf".

    Any help would be greatly appreciated.

    JBF

    Use this code in your action (note that this will not work if your file name)

    contains the comma):

    var filePath = this.path.replace(this.documentFileName,"");

    var NouveauNomFichier = this.documentFileName.substring (2);

    this.saveAs (filePath + newFileName);

  • How to find the function to remove the ink level

    Can someone please tell me how to find the function "for the removal of the ink level window" I need know when I use no to factory ink cartridges. I have Windows XP, but this is probably not important.

    Hi Laura,

    Find things such as ink levels is a function of the printer driver.

    This is provided by the manufacturer of the printer, and they are the best resource on the operation of their particular drivers.  Therefore, it is best to ask the manufacturer of the printer for advice on this issue.

    Sometimes, there is an icon in the taskbar that you can get this information.  Yet once, it is a function of the driver and the printer software.

    For reference:

    Check on a printer ink levels

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-ink-levels-on-a-printer

    How can I check my ink or toner levels?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-change-my-ink-or-toner-levels

  • ASP function to break the chain apart

    I have a number composed of 2 parts #-#. I need to get the first three digits before the dash. ASP has something similar to the PHP explode function. Can someone give me some advice on how to do this?

    Oh and thank you Adobe, to completely change the web site of the forum!

    Thank you
    Jeremy

    You have Split (string, delimiter) which results in a table. It's
    MyVar = Split("###-##","-")
    results in
    MyVar (0) = "#".
    MyVar (1) = "#".

    You have Left (String, characters of numbers) and Right (String, num characters.)
    who pull the specified number of characters from the left or to the right of the
    Required string.
    You have Mid (String), pos, num characters starting coming out of a substring.

    "bigj99012" wrote in message
    News:e356tl$OS4$1@forums. Macromedia.com...
    > I have a number that consists of 2 parts #-#. I need to get the first
    > three-digit before the dash. ASP has something similar to the
    > explode
    > function in PHP. Can someone give me some advice on how to do this?
    >
    > Oh and thanks Adobe, to completely change the web site of the forum!
    >
    > Thank you,
    > Jeremy
    >

  • Removing the non-English characters

    Hello
    I'm trying to define a regular expression that helps me to replace the non-English of a string characters.
    For example:
    BESANÇON
    and I need to get something like: BESANÇON, or BESAN * IT.

    Could someone give me some advice?
    Max has.

    You can use the convert function:

    SELECT CONVERT('BESANÇON','US7ASCII')
    FROM dual;
    
    CONVERT(
    --------
    BESANCON
    1 row selected.
    

Maybe you are looking for

  • Speed of the mouse in the Sierra

    Since installing beta Sierra (5) and now the GM, scrolling of the magic mouse and trackpad are accelerated to an unusable level on some applications. I noticed with VLC (volume control) and Minecraft (Browse items). I've adjusted down to the lowest s

  • Pavilion dv7-4167: blue box admin password

    Hello, I have the same problem as many others in a blue box seems to want the admin password and the usual password does not work. My code that appears after 3 attempts is 79076718. Does anyone know what code to use? I tried the code in several of th

  • Qosmio F10 - 136 and D-video output

    I have a Qosmio F10-136, I want to use the D-video output with cable SCART. I ve tried to change BIOS, VIEW the section, but through the various options it s PAL (SCART) NOT. Only PAL (S-Video), 525 p. 750, 1125i, 525i NTSC (US), NTSC (Japan).My BIOS

  • 6 curves 3 plots stacked tracing?

    I have a few filtered x, y coordinates z which I currently plot to a waveform with plots stacked chart. How can I include data not filtered on the respective plots? That is to say. 1 x route view filtered and unfiltered together, is filtered and unfi

  • __Cumulative a security update for Internet Explorer 8 for Windows 7 edition focuses on x 64 details of __Error Systems (KB2360131) Failed: Code 80070570___

    I was able to install all the updates except KB2360131.  I disable or removed all except windows Defender anti-virus protection.  I tried to manually install the update.  I ran Microsoft Fixit.  Nothing I've tried allows.