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 > Sybase > Parsing strings to extract phone number in Sybase IQ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-02-12, 09:52
achilles_m91 achilles_m91 is offline
Registered User
 
Join Date: Jan 2012
Posts: 1
Parsing strings to extract phone number in Sybase IQ

Hi everyone,

I need to extract phone numbers from a dataset in Sybase IQ. The data is in the form of charcter strings which may contains special characters. For example:

#123-12345
#(001)-1221313/14
-001-123-3124/223/312

Firstly, I need to strip off non numeric characters except slashes('/'). Slashes mean replacement digits at the end of the string. I want the output to be like:

12312345
0011221313
0011221314
0011233124
0011233223
0011233312

I can handle all the special characters using replace function multiple times. But still looking for a solution to handle the slashes ('/'). I am a bit reluctant to use a while loop since it will prove to be very costly and the dataset that I am working on is huge.

Thanks
Mandeep
Reply With Quote
Reply

Tags
numeric, parse, string, sybase iq

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