Finding special characters in the column

Hi,
Need a help to find out the special characters in the column. since the data is loaded from external files like excel etc.., there
are some special characters are got inserted in the column.
how do i find out the rows in the column which has special characters, Please help ASAP...
Thanks

Hi,
What do you mean by "special characters"?
SQL> With T As(Select 'A?BC' txt from dual union all
  2            Select 'AB%C' txt from dual union all
  3            Select 'ACAA' txt from dual)
  4  Select txt from t where Regexp_Like(txt,'[[:punct:]]');
TXT
A?BC
AB%C
[:punct:]      Punctuation symbols
                % . , " ' ? ! : # $ & ( ) * ;
                + - / < > = @ [ ] \ ^ _ { } | ~
{code}
Regards,
Christian Balz                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Finding special characters in a columns using SQL

    Hi,
    I have a column (Object_Name) which accepts character values. I want to find out such kind of records which has special charaters in my columns Object_Name. Please let me know, how do I write SQL statement for the same.
    Thanks for your time in advance.

    To find, for example, a comma in the OBJECT_NAME column try:
    SELECT OBJECT_NAME
      FROM MYTABLE
    WHERE INSTR(OBJECT_NAME,',')>0;To find multiple special characters, for example @ # + - _ , . : ; at same time try:
    SELECT OBJECT_NAME
      FROM MYTABLE
    WHERE INSTR(TRANSLATE(OBJECT_NAME,'@#+-_,.:;','@@@@@@@@@'),'@')>0;add a @ to the string '@@@@@@@@@' each time you add a character to the string '@#+-_,.:;'
    max

  • Dynamic SQL Query to Find Special Characters in Table columns

    Hi,
    I am new to OTN FORUMS.
    I am trying to find the columnsi of a table which have special characters in them.
    I am planning on using this query
    select ' select INSTR('||column_name||', chr(0))
    from '||table_name||'where INSTR('||column_name||', chr(0)) >0' from user_tab_columns
    where table_name='Account'
    and spool the output to run as a script.
    Is this the right way or do u suggest any modifications to the query?
    Thanks in advance.

    Hi,
    I think your basic approach is right. Since you can't hard-code the table- or column names into the query, you'll need dynamic SQL.
    Instead SQL-from-SQL (that is, writing a pure SQL query, whose output is SQL code), you could do the whole job in PL/SQL, but I don't see any huge advantage either way.
    When you say "Special character<b>s</b>", do you really mean "one given special character" (in this case, CHR(0))?
    Will you ever want to search for multiple special characters at once?
    What if table foo has a column bar, and in 1000 rows of foo, bar contains CHR (0). Do you want 1000 rows of output, each showing the exact position of the first CHR(0)? If the purpose is to look at theese rows later, shouldn't you include the primary key in the output? What if CHR(0) occurs 2 or more times in the same string?
    If you'd rather have one row of output, that simply says that the column foo.bar sometimes contains a CHR(0), then you could do something like this:
    SELECT     'foo',     'bar'
    FROM     dual
    WHERE     EXISTS (
                SELECT  NULL
                FROM       foo
                WHERE       INSTR ( bar
                            , CHR (0)
                        ) > 0
                );

  • Finding special characters in a string

    Hi all, I'm using Oracle 10g.
    I have a column name with special characters. how can i replace the special characters in the column with space and no space depending on the special character. please see the example below. can i use REGEXP_REPLACE?
    create table
    create table sample_test (
      Name    VARCHAR2(20 BYTE))insert table
    insert into sample_test values ('O''NEIL')
         insert into sample_test values ('B.E.VICTOR')
          insert into sample_test values ('WILLIAM,L')
           insert into sample_test values ('MARY-ANNE')
               insert into sample_test values ('VON_ANCKEN')
                insert into sample_test values ('BROWN;L')i would like the output as follows
    Special Character         Name         Expected Name                  Remarks     
    Single Quotes            O'NEIL                  ONEIL                          Remove quotes and no space       
    Dot                      B.E.VICTOR         B E VICTOR                          Replace with space       
    Comma                      WILLIAM,L         WILLIAM L                          Replace with space       
    Hyphen                      MARY-ANNE         MARY ANNE                          Replace with space       
    Underscore                VON_ANCKEN         VON ANCKEN                          Replace with space       
    Semi Colon              BROWN;L          BROWN L                          Replace with space      Please advise.
    Thanks
    Bob

    A simple solution without regexp usage:
    -- Test Data
    with sample_test as
    select 'O''NEIL' name from dual union all
    select 'B.E.VICTOR'  name from dual union all
    select'WILLIAM,L' name from dual union all
    select'MARY-ANNE' name from dual union all
    select'VON_ANCKEN' name from dual union all
    select'BROWN;L' name from dual
    -- Query:
    select name old_name,
           translate(replace(name,'''',''),'.,-_;','     ') new_name
    from sample_test;Explanation:
    REPLACE deletes the quote
    TRANSLATE replaces dot, comma, hyphen, semicolon and underscore

  • I have a MacBook purchased in 2009 with Snow Leopard. I tried to access "special characters" from the Finder menu and an intermittent blank pop ups and will not stop. It also happens when I run Word or Pages.

    The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
    Consuelo Corretjer

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • How can I find special characters in a string

    Hi,
    I have a small task where I have to find special characters in a given string, Can anyone suggest.......................

    What is your definition of a "special character", could you be a bit more specific?
    Do you simply want to find the position of a specific character in the string?
    Can it occur more than once and you want to find all occurences?
    What should happen if the special character does not exist?
    For programming purposes, all 256 possible 8 bit characters (x00-xFF) can be treated the same. Non-printing characters can be entered in \-codes or hex display if needed.
    LabVIEW Champion . Do more with less code and in less time .

  • How to escape or remove the special characters in the xml element by regula

    Hi members,
    How to escape or remove the special characters in the xml element by regular expression  in java??
    For Example ,
    <my:name> aaaa </my:name>
    <my:age> 27 </my:age>
    In the above example , i have to retrieve the value of the <my:name> Element(For examlpe -- i have to get "aaaa" from <my:name> tag)...
    How to retreive this value by using DOM with XPATH in java
    Thanks in Advance

    Hi members,
    I forget to paste my coding for the above question....This is my coding......In this display the error...... Pls reply ASAP.......
    PROGRAM:
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Map;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    public class DOMReaderForXMP {
         static Document doc;
         static XPath xpath;
         static Object result;
         static NodeList nodes;
         public DOMReaderForXMP() throws ParserConfigurationException, SAXException,
                   IOException, XPathExpressionException {
              DocumentBuilderFactory domFactory = DocumentBuilderFactory
                        .newInstance();
              domFactory.setNamespaceAware(true);
              DocumentBuilder builder = domFactory.newDocumentBuilder();
              doc = builder.parse("d:\\XMP.xml");
              XPathFactory factory = XPathFactory.newInstance();
              xpath = factory.newXPath();
         public static void perform(String path) throws Exception {
              result = xpath.evaluate(path, doc, XPathConstants.NODESET);
              nodes = (NodeList) result;
         public void check() throws Exception {
              perform("//my:name/text()");
              if (!nodes.item(0).getNodeValue().equals("application/pdf")) {
                   System.out.println("Mathces....!");
    ERROR:
    Exception in thread "main" net.sf.saxon.trans.StaticError: XPath syntax error at char 9 in {/my:name}:
    Prefix aas has not been declared

  • Special characters in the employee names is adding ASCII  to the file

    Hi Team,
    Iam working on a outbound interface which has a length of 3000. For the last name it is having some special charecters Vázquez . When downloading into application server, the special characters in the employee names is adding ASCII characters to the file Vázquez . This is increasing the record length to 3001.
    Please let me know how to remove this ASCII charecters. It is happening only for application server.
    Rgds
    Kishor

    Hi
    Please refer below link.
    [Re: Translation of special charachter like 'u00E3au00EA']
    ~~~Ganesh Kumar K.

  • Problem to get file with special characters in the message

    Hi, I'm developing an application that read the email and save the attached file. However, some files have special characters in the name, like: Documento de EspecificaÇÂO.doc
    I noticed the de name of the file in de message head is:
    "=?iso-8859-1?Q?Documento_de_Especifica=E7=E3o.doc?="
    I'm already using the JavaMil 1.4.5
    Tha is my code:
    package br.com.cesan.helpdesk;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Properties;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import javax.mail.search.FlagTerm;
    public class LerEmail2 {
         * @param args
         * @throws MessagingException
         * @throws IOException
         public static void main(String[] args) throws MessagingException, IOException {
              // TODO Auto-generated method stub
              // Get session
         Session session = Session.getInstance(new Properties(), null);
         // Get the store
         Store store = session.getStore("pop3");
         store.connect("pop.xxxxx.com.br", "user", "password");
         Folder folder = store.getFolder("INBOX");
              //folder.open(Folder.READ_ONLY);
              folder.open(Folder.READ_WRITE);
              // Show only unreaded Messages
              FlagTerm ft = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
              // Get directory
         Message message[] = folder.getMessages();     
         //Message messages[] = folder.search(ft);
         for (int i=0, n=message.length; i<n; i++) {
              System.out.println(i + " - "+ message.getSubject() +" - " + message[i].getSentDate() );
              Object content = message[i].getContent();
              if (content instanceof Multipart) {
         handleMultipart((Multipart)content);
         } else {
         handlePart(message[i]);
         // Close connection
         folder.close(false);
         store.close();
         public static void handleMultipart(Multipart multipart) throws MessagingException, IOException {
              for (int i=0, n=multipart.getCount(); i<n; i++) {
                   handlePart(multipart.getBodyPart(i));
         public static void handlePart(Part part) throws MessagingException, IOException {
              String disposition = part.getDisposition();
         String contentType = part.getContentType();
         if (disposition == null) { // When just body
              System.out.println("Null: " + contentType);
              // Check if plain
              if ((contentType.length() >= 10) && (contentType.toLowerCase().substring(0, 10).equals("text/plain"))) {
                   part.writeTo(System.out);
              } else { // Don't think this will happen
                   System.out.println("Other body: " + contentType);
                   part.writeTo(System.out);
         } else if (disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
              System.out.println("Attachment: " + part.getFileName() + " : " + contentType);
              saveFile(part.getFileName(), part.getInputStream());
         } else if (disposition.equalsIgnoreCase(Part.INLINE)) {
         System.out.println("Inline: " +
         part.getFileName() +
         " : " + contentType);
         saveFile(part.getFileName(), part.getInputStream());
         } else {  // Should never happen
         System.out.println("Other: " + disposition);
         public static void saveFile(String filename, InputStream input) throws IOException {
              if (filename == null) {
                   filename = File.createTempFile("xx", ".out").getName();
              // Do no overwrite existing file
              File file = new File(filename);
              for (int i=0; file.exists(); i++) {
                   file = new File(filename+i);
              System.setProperty("file.encoding", "iso-8859-1");
              FileOutputStream fos = new FileOutputStream(file);
              BufferedOutputStream bos = new BufferedOutputStream(fos);
              BufferedInputStream bis = new BufferedInputStream(input);
              int aByte;
              while ((aByte = bis.read()) != -1) {
                   bos.write(aByte);
              bos.flush();
              bos.close();
              bis.close();
    The problem occurs in:
    FileOutputStream fos = new FileOutputStream(file);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    BufferedInputStream bis = new BufferedInputStream(input);
    int aByte;
    while ((aByte = bis.read()) != -1) {
    bos.write(aByte);
    Thanks
    Edited by: user10283976 on 30/03/2012 07:36
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:38
    Edited by: user10283976 on 30/03/2012 07:40
    Edited by: user10283976 on 30/03/2012 07:41
    Edited by: user10283976 on 30/03/2012 07:42

    http://www.oracle.com/technetwork/java/javamail/faq/index.html#encodefilename

  • Issue while generating MD5 if there are any special characters in the CLOB

    Hi Guys,
    I need your help...
    We are using dbms_crypto.hash to generate the MD5 hash value for a CLOB that will be sent to other feeder systems. The feeder systems validate the file by generating the MD5 hash value on their end and compare with the MD5 generated in Oracle and accept the file only if the MD5 hash value matches.
    The MD5 file matches between both the systems except in the case where there are special characters in the CLOB. Somehow, MD5 is prefixing  character before any special character and calculating the MD5 value. In our case, our special characters being ®, §, ™, ©....
    This is a high priority issue for us and it is holding our UAT.
    We are using Oracle 11.2.0.2.0.
    Your response is really appreciated.
    Best Regards
    Gupta

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version.
    >
    We are using dbms_crypto.hash to generate the MD5 hash value for a CLOB that will be sent to other feeder systems. The feeder systems validate the file by generating the MD5 hash value on their end and compare with the MD5 generated in Oracle and accept the file only if the MD5 hash value matches.
    The MD5 file matches between both the systems except in the case where there are special characters in the CLOB. Somehow, MD5 is prefixing  character before any special character and calculating the MD5 value. In our case, our special characters being ®, §, ™, ©....
    >
    See if my reply in this thread addresses your problem.
    Re: MD5 HASH computed from DBMS_CRYPTO does not match .NET MD5
    The fix in almost all of these cases is to understand that the Crypto package always converts everything to AL32UTF8 before hashing.
    ALWAYS.
    ALWAYS.
    ALWAYS.
    Unless the 'other' hash generators (substitute any generator you wish) do it the Oracle way you will NEVER get a match.
    NEVER.
    NEVER.
    NEVER.
    There are no workarounds.

  • Reg Special Characters in The Names causing the problems EX: Bu00E1rbara u00E1u00EDu00F1u00E9

    Hi Friends,
    In the Infotype 0002 I am able to observe the Special characters   in the First Name & Last Name.
    When I run standard SAP report i.e. Birthday list and trying to save the output to the *clipboard option and paste it to the notepad*, I observed that last some characters were missed out depends on the special characters available in the First Name  Last Name.
    Assume if there are 5 special characters avialble in the Names, then 5 characters will be missed out in the output.
    Please help on this issue.
    Thanks & Regards
    Prashanth K
    Edited by: Prashanth Konda on Feb 15, 2010 5:49 PM

    Hi Binder,
    Thanks for the repsonse.
    I didn't get what do you mean by  Correct Code Page ?
    Thanks & Regards
    Prashanth

  • I am with error of special characters in the hour to matter given in BI 7

    Good afternoon, I am with error of special characters in the hour to matter given in BI 7
    <a href="http://img234.imageshack.us/my.php?image=erroau3.jpg" target="_blank"><img src="http://img234.imageshack.us/img234/4083/erroau3.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>

    OK....!!!!!
    just download the Excel file (*.xls) and try open with Word-MS. In the document search by the string that you have mentioned in the question. (Use Ctrl +F).
    If you see something like "ABC bla bla ba & instead of  &amp ,  then you have to pass the data through the code I've mentioned.
    You can get more details on encoding special characters UTF-8 in Google.com or Sun Websites etc.
    You can also encode the & in hexadecimal format to get the desired output.

  • Special characters in the shared key when importing firewalls

    Hello
    We are using CWVMS to import and configure PIX firewalls.
    The shared isakmp key of one of the firewalls has not been accepted during import because it contains special characters.
    The problem is that the customer does not have authority to change the key.
    Does Management Center for Firewalls really accept only alphanumeric isakmp keys ? Is there another alternative to changing the key ?
    Thank you sincerely for your help.

    I am not sure what your problem is. But ISAKMP keys can be changed directly on the PIX using the command line interface. I have not used any special character in the ISAKMP keys. Can anyone confirm that special characters can be used within ISAKMP keys?

  • Entering special characters at the command line.

    I'm writing a simple program in java that automates certain processes in learning a foreign language.
    This includes holding a database of vocabulary within the context of a sentence and testing a student on words they have encountered.
    Nothing too tricky, except that I am having trouble with entering special characters at the command line. I'm not really surprised by this and was hoping that someone could help me.
    I'm using a mixture of Solaris 8 and Mac OS X 10.3 for running the software, so anyone with any input on either of these systems will be able to help.
    The characters I am trying to enter are the following:
    �,�,�,�,�,�,�,�,�,�,�,�.
    They are latin, and used in Spanish amongst other languages.
    I'm a little confused by the implementation of character sets. I can enter these characters in applications such as word or textedit or an email, but just not at an X window.
    From looking at the web it appears that these characters can be input using the
    Latin1 (ISO 8859-1) character set or the ISO 10646-1/Unicode extension.
    I'm just not sure what I actually have to do to get it to work.
    If anyone can offer any help I'd be really grateful.
    Ian Stanton

    It's a problem that could be encountered in different circumstances, in this circumstance it is with a program I am writing in java.
    I anticipate that these days not that many applications are delivered that require use of the command line, but since I am still learning Java it is necessary to explore this avenue.
    It's interesting actually since presumably developers writing code for the international market need to accomodate characters similar to those I am attempting to enter, and more that are less familiar to me such as far and middle eastern scripts, and of course many others.
    We (possibly) assume that since a character is printed on our keyboard it is a simple matter to read it in. But what if I was a Spanish student wanting to type a character into the command line and that character wasn't there? I believe that Spanish (and variants of that language) is the third most spoken language on the planet.
    These characters are often relatively easy to enter in office and internet applications amongst others but apparetly not so at the command line.
    Maybe this question is more suitably asked of the Unix community but I thought it a good idea to try Java since i was writing Java code and that many Java programmers could have encountered the same problem.

  • How set maximum of characters for the columns

    Hello I use a JTable and I want to set maximum of characters for the columns.
    For example column 1 max 10 characters, column 2 max 20 characters, etc..
    How can I do this?

    The principle is as follows: a table uses certain input components for editing a cell value, e.g. a JCheckBox for Boolean-type values or a JTextField for textual/numerical values. By default, a JTextField doesn't have any size limit, so you can enter as many chars as you want. In order to change this behaviour, you'll have to
    1.) create a JTextField that does have a size limit and
    2.) set a CellEditor on the JTable which uses this manipulated JTextField.
    An easy way for 1.) is to create a custom Document (the internal data representation for text components, the M-part of the MVC -- see javax.swing.text.Document) that doesn't accept any text beyond a given limit, e.g.:
    public class LimitedDocument extends PlainDocument {
      private int max = 0;
      public LimitedDocument(int max) {
        this.max = max;
      public void insertString(int offset, String str, AttributeSet a) throws BadLocationException {
        // too long for the limit; get current contents, insert, and cut off trailing chars
        if ((getLength() + str.length()) > max) {
          StringBuffer buf = new StringBuffer(getText(0,getLength()));
          buf.insert(offset,str);
          remove(0,len); // remove current text contents
          super.insert(0,buf.toString().substring(0,max),a); // insert whole text
        // no problem, will fit
        else {
          super.insertString(offset,str,a);
    }Then, in order to set the cell editor -- for example for the first column --, you can do as follows:
    myTable.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(new JTextField(new LimitedDocument(5),"",5)));This will create a new DefaultCellEditor (see javax.swing.table) and initialize it with a given text field which will be responsible for any edition in this column. As the text field itself is created using a limit of 5, it should accept no text insertion beyond 5 chars.

Maybe you are looking for

  • Composite and S-video

    Does the 2009 mini support composite and/or s-video. If so, which cable would work best?

  • Error while creating a RFC model for WD for Java

    Hi, While trying out the example(TutWD_FlightList_Init.zip) for model programming in the NDS,I got the following error when I try to create a model: Plugin Name     Web Dynpro Model Editor Services Plugin Id     com.sap.ide.webdynpro.service.modeledi

  • Mac users DO NOT use this Desktop software! it will cause hours of heartache

    I have exactly the same issue with a Bold and have still to find any option to resolve the issue other than to entirely wipe the device and go through the tiresome process of reinstalling and updating everything to the way i had it. I am utterly furi

  • Need to trigger Save in ME22N - ME_PROCESS_PO_CUST

    Hello fellow gurus,      Riddle me this:  How can I trigger a SAVE in ME22N in the context of BAdI ME_PROCESS_PO_CUST?  I have created a custom tab at the Header level so that our users can put data in the fields and populate the fields in the Purcha

  • IPod won't display imported photos

    I use iPod Photo mainly to upload photos from my digital camera in the field. It has always displayed a thumbnail of the pic in the little dotted box as they are imported, and afterwards they can be viewed and checked by selecting the Roll, then Brow