If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Extracting Only Alphanumeric Charcater in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-12, 07:21
Nithyasankari Nithyasankari is offline
Registered User
 
Join Date: Feb 2012
Posts: 4
Extracting Only Alphanumeric Charcater in DB2

Hi,

How can we extract only alpha numeric characters from a string in DB2??

My input string is mixed with Special characters:
ABCdef@^TM12343"":}}YES
Expected Ouput :
ABCdef12343 YES
(Only to extract Alpha numeric characters excluding the special characters)

Note : Set of Special characters is not known exactly to use translate /replace function.

Is it possible to use NOT function in inside translate/replace?
(Like translate those characters to '' which does not belong to [A-Za-z0-9])

Please help me in this .

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 02-06-12, 08:03
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
You should have posted the question in DB2 forum; its functions might be different from Oracle ones.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On