DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: check special characters

  1. #1
    Join Date
    Feb 2000
    Location
    NJ, United States
    Posts
    250
    Hi everyone,

    I need to write a function which will checK FOR SPECIAL CHARACTERS(LIKE !@#$%^) A COLUMN BEFORE MOVING IT TO THE MAIN TABLES. It should accept numeric and alpha
    characters.

    Now the column it has to check is a varchar2 column and I can't pass it directly to to_char function(which I found will not accept special characters).

    Is there any other way to check for special characters.

    Thanx in advance,

    Kavita
    KN

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    You will probaby end up using a PL/SQL loop with the functions INSTR http://technet.oracle.com/docs/produ...tion.htm#77600 and SUBSTR http://technet.oracle.com/docs/produ...tion.htm#87096
    Jeff Hunter

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Probably even more appropriate function to use in this case would be TRANSLATE().
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Feb 2001
    Posts
    123
    Or you could just catch the exception that is thrown on attempting the assignment.

    HTH

    David.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width