Subject RE: [firebird-support] stripping phone numbers
Author Si Carter
Hi,

> -----Original Message-----
> I would like to strip phone numbers (with a trigger after
> insert in a second field) so I get only the raw numbers in
> the second field. Any nondigits should be stripped.
> Example: +49/6849-22415 should give 49684922415.
> Is there any posibility to solve this without creating a UDF?

I created a stored proc to do just this type of thing, its called splittext
and can be seen here (http://www.fbtalk.net/viewtopic.php?id=238). To use
you would call like this:

SELECT OPTEXT
FROM SPLITTEXT('+49/6849-22415', NULL, '-/+')

hih

Si Carter
http://www.fbtalk.net/ - Web Based Firebird Forum
http://www.tectsoft.net/ - Homepage