TO_CHAR for a string

Hi all

on 11.2.0.4 on Win 2008 Server

I have this string; ' 06 5885 2237'

And I want to display it as: ' 06 58 85 22 37'

But

Select to_char ('06 5885 2237', ' 99 99 99 99 99') twice;

ORA-01722: invalid number

Any solution?

Thank you.

Now you 'could' do is:

Select to_char (TO_NUMBER (REPLACE ('06 5885 2237 ',' ')), '00G00G00G00G00','NLS_NUMERIC_CHARACTERS = ".) ') twice;

HTH

Tags: Database

Similar Questions

  • Research within a tree of files for a string in a file

    Okay, I give up...

    I'm trying to search for a particular string like "xyz" in a bunch of files in various places in a tree *.txt - all folders and files in that I want to search are rooted in a particular folder.

    It used to be that Windows Explorer has a "Find files and folders" feature that had a "Search subfolders" box was just very well worked and intuitive.

    However, with the new improved search facility, I can't it to search for a string in a file tree. And assistance does not help.

    I even went in search, typed in "*.txt" for the name, and the search string, I get "name of xyz: * .txt" and the string is not found, even though I know that it is located in at least one of the files in the file tree under 'place' which is like C:\apk

    Could point me to it someone please to a description of how to do this, or maybe a pointer quick as to what I'm doing wrong?
    Thank you!

    Hello Paul,

    The syntax for Windows Search is now quite different.  On the one hand, the jokers work differently and are rarely needed for common searches.  Try instead to use the ext property:

    XYZ ext:txt

    However, remember that Windows Search is now based on word, not on the character.  When you search the contents of the file, if the string "xyz" is in the middle of a Word, it can not be found unless it is preceded by a space, an uppercase letter or a punctuation character.  Thus, you may need to perform a search on part of the word preceding the string "xyz".

    There is good information on the new syntax of search here:
    http://www.Microsoft.com/Windows/products/winfamily/desktopsearch/TechnicalResources/advquery.mspx

    Regarding the search for subfolders by default on Vista, the option is set in the search window "Folder Options" tab dialog.

    Some other tips:

    Remember that the parent folder is set to be indexed in the Indexing Options dialog boxes.

    Be aware that the type of search you do is preferable to Windows Explorer or the main search box, not in the start menu.  The latter has its options, which are often more restrictive than other methods.

    Mr. Doug in New Jersey

  • Under XP I could search for a string in all the files on my computer. I can't find this search function of SMEs on Windows 7. Anyone?

    On Windows XP, there is a search function to search for a string in any kind of files on your computer. You are looking for a specific name was easy, if you fogort what kind of file, this name occurred in or what it was named.

    On Windows 7 it only allows searching for a name of a file.  How to search for strings in file names?  29/12/12 Paul Figueroa

    Oh, what you want is the content property.

    content: ~ = Figueroa

    [Update: apparently special search symbols such as ~ = do not work with the content when property indexed research places, but work during the search in unindexed locations.]

    I should mention that Windows 7 Search is not case sensitive, so it makes no difference to try to find upper or lower case letters.  In addition, Windows 7 Search is not able to search the contents of files that have no file extension.  There is also a weird question having to watch in Indexing Options to determine which file extensions are defined for content, research, where you have a type of unusual file that is not defined for the content of the search.

  • I got error java.lang.NumberFormatException: for input string

    Using Jdeveloper 12 c, Oracle DB 12 c, Windows 8.1, this is my code to read the Excel file to DB.

    FileInputStream file = new FileInputStream

      (new File("E:/Company Mails.xlsx"));

      XSSFWorkbook workbook = new XSSFWorkbook(file);  

                XSSFSheet sheet = workbook.getSheetAt(0);   

                Iterator<Row> rowIterator = sheet.iterator();         

                DCBindingContainer bindings2 = (DCBindingContainer)

      BindingContext.getCurrent().getCurrentBindingsEntry();

                JUCtrlHierBinding obj = (JUCtrlHierBinding)

      bindings2.findCtrlBinding("CompanyMails1");

                ViewObject vo = obj.getViewObject();           

                BindingContainer bindings = BindingContext.

      getCurrent().getCurrentBindingsEntry();

                OperationBinding operationBinding = bindings.

      getOperationBinding("Commit");                           

                        while (rowIterator.hasNext()){                       

                            Row row = rowIterator.next();

                            Iterator<Cell> cellIterator = row.cellIterator();

                            oracle.jbo.Row r = vo.createRow();                       

                            while (cellIterator.hasNext()){

                                Cell cell = cellIterator.next();

                                r.setAttribute("No", row.getCell(0));

                                r.setAttribute("Mail", row.getCell(1));

                                r.setAttribute("Person", row.getCell(2));} }

                        file.close(); operationBinding.execute();}

                    catch (Exception e){e.printStackTrace(); }

            return null;}


    This is the message I get on the Jdev

    java.lang.NumberFormatException: for input string: 'No' to java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

    Untitled.png

    Please, format your code by using the Advanced Editor.

    As first, paste here stackTrace of jdev console and mark the line of code where the exception occurs.

    Then, just to check something, take a look to the while loop and add after the line of code:

    rowIterator.next(); // <-- AD THIS LINE OF CODE HERE !
    while (rowIterator.hasNext()){
                   Row row = rowIterator.next();
    

    try again and let me know what happens

  • BY SPECIFYING THE NUMBER OF IDENTICAL CHARACTERS WHEN SEARCHING FOR A STRING

    Hey everybody,

    built-in indexOf() finds a character "." in the string "1.2.3." If value == 1.

    It looks nothing if the value == 0 or 2 or a number greater than 2.

    var txt:String = '1.2.3.';

    var: output string = String (this);


    If (txt.indexOf(".") == 1)

    {

    trace (output);     [object MainTimeline]

    }

    The must be a simple method to specify the number of characters "." When you search for the string "1.2.3.".

    For example, if there are 2 characters "." in the string "1.2.", then run it through a statement but if contains no 2 characters "." then do nothing.

    There is a built-in function called contains , but it is mainly used in XML.

    indexOf() resembles codes javascript unstable, one of these framework which unixers hatred.

    You don't have to use regular expressions to determine how many points is in the string. Use of split and read the length:

    var txt:String = '1.2.3.';

    trace (txt. Split("."). (length);

  • How to search for a string in the order reversed through REGEXP_INSTR

    Hi all

    I have the SQL query in which I want to get the first position of the occurrence of the end of the string

    for example:
    String:NBANK-ASD-00-1001-525-1002
    Condition: the position of the character '-' the last. (Note: character can also be '-' or ' / ')
    output: 1002

    for above condition, I have a request next return


    SELECT SUBSTR('NBANK-ASD-00-1001-525-1002',REGEXP_INSTR('NBANK-ASD-00-1001-525-1002','[^-/]',1),LENGTH('NBANK-ASD-00-1001-525-1002 ')) FROM dual;



    but I'm getting more results

    NBANK-ASD-00-1001-525-1002
    means that the expression returns 0...

    pls help me solve this problem.

    You can change your query as follows

     SELECT SUBSTR('NBANK-ASD-00-1001-525-1002'
       , REGEXP_INSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       , LENGTH('NBANK-ASD-00-1001-525-1002'))
       FROM dual;
    ;
    

    but you can just use REGEXP_SUBSTR to get the same result...

     SELECT REGEXP_SUBSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       FROM dual;
    ;
    

    Kind regards
    Bob

  • I am looking for a string

    Hello

    If I probe a string. I get this Watch probe.

    Name: tested

    Value: 'Testpart_0_part_0 '.

    How can read the value of 'Testpart' (in this case 0).

    BR

    P

    I have a feeling that it is a matter of LabVIEW, if this is the case you have posted in the wrong place.

    You can use the split function for DIAdem

    Dim sArray, sSampleString, iTestPart
    sSampleString = "Testpart_1_part_0".
    "sArray = Split (sSampleString,"_",-1, vbTextCompare in)"
    iTestPart = Val (sArray (1))

  • HELP for the string with the value of waste

    Here, I have attached front and block diagrm and vi. Problem is im get required string displayed and with it, some is not required to chain appears also. Help me edit.

    NOTE: If number: corresponds to 90610003 must be obtained. But in my code im getting

    90610003
    VLPN: KA - 01 I-2000
    Dest ID: 100
    Top speed: 15
    Admin1: 9538991097
    Admin2: 9538991096
    Admin3: 9880899964 (NOT NECESSARY a "BOLD")

    Here is the text of program where I searched for string

    IRU details.txt

    Number: 90610003
    VLPN: KA - 01 I-2000
    Dest ID: 100
    Top speed: 15
    Admin1: 9538991097
    Admin2: 9538991096
    Admin3: 9880899964

    Note: It is also possible that you will get a \n (newline) or a \r\n (CRLF), but since you did not save the actual data you VI, I can't be sure.

  • Restrict user access to admission 0-9 for the string data

    Hello

    I want to this control at the entrance façade. This control allows the user to choose between 0-9. For example 0 1 2 3 4 5 6 7 8 9.

    Control do not allow the user to upgrade-1-2-3... 10 11 or... or decimal.

    This number will be still converted to a string as the name of a folder to create.

    Thanks for posting to this thread and help

    PX

    Firstly, right click and select ' entire representation (i.e. U8), and then right click then select data entry. Uncheck "use default limits" and enter the desired range.

    If you have noticed, everything is done by right-clicking. You should be familiar with all the right click options. Did you do tutorials?

  • Look for the string of the numbered array element.

    This is my first post, so I'll probably miss one thing or another.  I will look nothing missed as soon as possible. I write code LV to test additional County stored in a CSV text file. Counties represent the stimulated current of a diode in a beam of radiation. The product is a QA device for a medical radiation treatment machine. The Integrator output proportional to the current diode accumulates as a whole into account in the text file. My LV code puts the numbers in the tables, calculates the incremental time derived and analyzed statistically. Numbers of the columns in the table data represent unique components. Default number of data column is sorted in a 1 d table has no column number. As if not column 10 represents CR39 of PCB 11. I need an algorithm how to connect a string such as CR39-PCB11 to the element of the array 1 d failure or relate to the string to the column in the data table that fails. Could you suggest a way to do this?

    If I understand you correctly, instead of these numbers that are in the Updates (odd) 'zero', you want to get premium channels. For the moment, the operator uses a lookup table, to find the chain (component) that corresponds to the column number.

    It's easy, because you only need an array of strings (corresponding to the column number 0 n) and use the array index with the index of the column. Place it in a loop for get all the clues of failures (the loop autoindexing for).

    Felix

  • The search for exact strings (and the right formula)

    I am using FIND instruction to search multiple strings in a larger formula. The original formula that I do stand out is the following:

    = IF (ISNUMBER (FIND ('INC', A1)),' ', 'Y')

    Of course, this gives a Y if he finds some text in "". "" However, I have several channels for which I would check, and they need to be exact. That is to say when I search Inc. and Inc., I don't want Inc. to be counted. So, I tried the following formulas.

    = IF (ISNUMBER (FIND (OR("INC",inc"), A1)),' ', 'Y')

    = IF (SUM (COUNTIF (A1, "* INC. *","{* Inc. *}")),' ',' Y')

    The second works better, but it also counts Inc. as a football game. Any suggestions?

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Search for the string in the string table and see the following value in the line

    Hi, I'm new I have LV and I do a Vi that read worksheet values and generates 2d channels of the same spreadsheet table. For the moment everything I need is a function that find specyfic string in this table and show the next value in a line. As:

    Table:

    a; b
    c; d
    f; g

    example: find the 'c '.

    VI shoud show "d".

    Concerning

    Not a bad homework problem.  Do it with pencil and paper.  Write your table and pretend you're the computer.  What you want to do (step by step)?  What questions do you have?

    Now that the translation a bit to computers.  You mentioned that the data is in an array of strings.  What structures (LabVIEW) work with tables?  [Do you know how to work with tables?  [Otherwise, review some of LabVIEW Tutorial material - see top right of the first page of the Forum].  What do you know about channels?  What questions you need to ask questions on the channels?  What do you know about string functions?

    Watch these things in some LabVIEW code, 'feed' some data and see what he does.  If it seems to do things "unexplained", you can try to look at the block diagram to run by turning the performance highlight (and if you don't know what that means, use the help of LabVIEW and see the tutorials).

    Bob Schor

  • SQL query for empty string

    I am trying to execute the following SQl query, SELECT * failure WHERE ID = '123 ' AND RepairAction =' '; using the DB tools run Query.vi. This query never find record in my database. My database contains a record where the registered ID contains the value '123' and the RepairAction field is an empty string. If I remove the declaration 'AND RepairAction' ';' my query text, the record is found. I think my problem is that I do not use the correct syntax to describe and an empty string. I tried the following: "," ",""," "and NULL as empty and none of these work string arguments.

    I was hoping someone might be able to tell me what the correct syntax is an empty string or if there is another approach that I take.

    Thanks in advance for your help,

    Jim

    Jim,

    Just to be sure, have you used 'is' instead of '=' in this command?

    This makes all the difference in this command.

    Cerati

  • How do a search for IPS inside a html tag for a string?

    I need to make the search for cisco IPS of the chain eb 03% 59% eb % 05% e8% f8% ff % ff % ff % 49% 49% 49 inside any *.html

    I tried the http service (ask Regex) and AIC http (Msg body Patten) but no luck

    Thank you

    Using IDM

    Configuration > definition Signature > Assistant personal than Signature

    Select TCP as the Protocol to inspect >

    Click on the single TCP connection option button >

    Select other as the type of service >

    Enter the parameters for signature >

    Select your action event

    String Regex class enter eb 03% 59% eb % 05% e8% f8% ff % ff ff 49% 49% 49%

    Enter 80 in the field of service Ports

    M.

  • Boolean converter doesn't work is not for the string data type

    Hi gurus,

    I am creating a Boolean converter based on the O/N value for column EO, but every time I select the checkbox that's throwing error "attribute with the value false precision/scale not valid."

    If I add PrecisionRule = 'false' for TestFlag to the EO, I had ORA-12899: value too large for column 'XX '. "" "" FDY_TEST '. "" TEST_FLAG' (real:, maximum of 5: 1).

    Seems that it is still store 'true' / 'false' char to instead "Y/N", even if the POS in the converter class return System.out.println ("getAsObject - value is Y")

    If I use the transitional attribute (TestFlagDummy) and change the EOImpl to TestFlagDummy getter and setter, it works very well.

    I was wondering why the converted does not, in which case the other converter for string I test to convert the value entered for upper case works very well.

    Appreciate any help.

    Definition EO

    ------------------

    < attribute

    Name = "TestFlag.

    Precision = '1 '.

    ColumnName = "TEST_FLAG."

    SQLType = 'VARCHAR '.

    Type = "Java.lang.String"

    ColumnType = "VARCHAR2".

    TableName = "FDY_TEST" >

    < DesignTime >

    < name Attr = "_DisplaySize" Value = "1" / >

    < / DesignTime >

    < / attribute >

    Converter class

    -----------------------

    public class YNConverter

    implements the converter, ClientConverter

    {

    public Object getAsObject (FacesContext facesContext, UIComponent uiComponent, String value)

    {

    If (true".equals (value)) {" "}

    System.out.println ("getAsObject - value is Y");

    }

    else {}

    System.out.println ("getAsObject - value is N");

    }

    return "" true ".equals (value)?". Y":"N";

    }

    public String getAsString (FacesContext facesContext, UIComponent uiComponent, Object value)

    {

    System.out.println ("getAsString - Value is" + value.toString ());

    Return "Y".equals (value.toString ())? "true": "false";

    }

    public String getClientLibrarySource (FacesContext facesContext)

    {

    Returns a null value.

    }

    public Collection < String > getClientImportNames()

    {

    Return Collections.emptySet ();

    }

    public String getClientScript (FacesContext facesContext, UIComponent uiComponent)

    {

    Returns a null value.

    }

    public String getClientConversion (FacesContext facesContext, UIComponent uiComponent)

    {

    Returns a null value.

    }

    }

    USER INTERFACE

    ---

    < af:selectBooleanCheckbox

    label = "#{bindings." TestFlag.label}"id ="sbc1.

    value = "#{bindings." TestFlag.inputValue}.

    Converter = autoSubmit "YNConverter" = "true" / >

    Kind regards

    Ferrere

    Your link should look like this:

    
      
        
      
    
    

    VO attribute similar to the following:

      
    

    and EO attribute similar to the following:

    
      
        
      
    
    

    Dario

Maybe you are looking for

  • The 'Awesome Bar' does not work. He does not remember anything of the bookmarks

    Just updated again Firefox. In the past, when I'd start typing a site in the firefox address bar it would complete as it was already in my favorites. But now it does nothing. It just sits there waiting for me the full address. I could start typing Ne

  • Partition of hard disk on Tecra 8100

    I changed the 12 GB of HARD drive with a 40 GB HARD drive. But I couldn't partition this time. The last time with the help of this forum I had partitioned the 12 GB for use with Win 98 and XP. I think you forgot the procedure to partition the HARD dr

  • Entry of NaN to a subvi

    Hello I have a sub vi to discover the derivative that has got a double entry. The sub - vi is inside a while loop and go entry is a double value only. but inside the subvi is show an entry "NaN" and the slot that VI gives an output of "NaN". Thanks i

  • Error code: 8024002D (disc asking works, which I did not)

    error code 8024002D__asking for drive of work I did not and have never had.

  • Windows security alerts

    Security Center gives a message that virus protection is out of date and when I try to update my antivirus it gives a second message "your time computer system seems to be inaccurate." This can lead to false virus database reports of uo-todateness. "