Hi, I have 2 fields ,'Tel No' and 'Mobile Phone Number', in which, Mobile phone number might exist in Tel no field. values might contain()*-+/ and '0-9' ,values may have prefix like zone ,country code. there's possibility that customer input 2 Mobile phone numbers altogether as one field value. General speaking, there's all possibility for the input for MP. Criteria for selection, as a valid MP number, it should start with '133','139','150' etc(about 20 numberic prefix) with a total length of the mp number equals 11,say 13333697005. I first (SUBSTRn(t1.'Tel No'n, 1,11)) AS tel1left, (SUBSTRN(t1.'Tel No'n, LENGTH(t1.'Tel No'n)-11, 11)) AS tel1right, (SUBSTRn(t1.'Mobile/Pager No'n, 1,11)) AS MPleft, (SUBSTRN(t1.'Mobile/Pager No'n, LENGTH(t1.'Mobile/Pager No'n)-11, 11)) AS MPright pick out those 4 fields. then length((COMPRESS(t1.tel1left, '()-/,*&+'))) AS t1leftcomlen, length((COMPRESS(t1.tel1right, '()-/,*&+'))) AS t1rightcomlen, length((COMPRESS(t1.MPleft, '()-/,*&+'))) AS mpleftcomlen, length((COMPRESS(t1.MPright, '()-/,*&+'))) AS mprightcomlen find those compressed length=11 and I have a data MP_prefix. can any one give hand how to pick out valid Mobile phone through the above 4 fields if exist? if there's 2 valid, only the first found will be needed. Thanks.
... View more