F_TELEFONNR
<< F_GENERATESNDXINDEX F_SOUNDEX | IBExpert UDF Functions | F_DIGITS >>
F_TELEFONNR
- function from adhoc
- Compatible with UTF-8
- Input VARCHAR(32760) Telephone no. as string (or something similar, from which everything is to be removed up to the numbers), INTEGER defines the amount of numbers at the end to replace with *
- Output VARCHAR(32760)String without all non numbers
"49" at the beginning is changed to "+49". If the string starts with one "+", this remains. Note: This function is necessary for "wildly" formatted telephonenumbers for TAPI to a Telephone(system) which couldn't do this by itsself.
Example
SELECT '0232653***' AS ISCORRECT, F_TELEFONNR(' (0232) / 6535-35', 3) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_TELEFONNR ========== =============================================================================== 0232653*** 0232653***
Example
SELECT '+001232653***' AS ISCORRECT, F_TELEFONNR('+001 (232) / 6535-35', 3) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_TELEFONNR ============= =============================================================================== +001232653*** 0+001232653***
Example
SELECT '+49232653***' AS ISCORRECT, F_TELEFONNR('+49 (232) / 6535-35', 3) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_TELEFONNR ============ =============================================================================== +49232653*** +49232653***
Example
SELECT NULL AS ISCORRECT, F_TELEFONNR(NULL, NULL) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_TELEFONNR ========== =============================================================================== <null> <null>
back to top of page
<< F_GENERATESNDXINDEX F_SOUNDEX | IBExpert UDF Functions | F_DIGITS >>