UFN_PHONE_REMOVEFORMATTING
Removes characters used in common phone formats.
Return
| Return Type |
|---|
| nvarchar(100) |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @NUMBER | nvarchar(100) | IN |
Definition
Copy
create function dbo.UFN_PHONE_REMOVEFORMATTING
(
@NUMBER as nvarchar(100)
)
returns nvarchar(100) with schemabinding as
begin
-- NOTE: There is an indexed computed column in the PHONE table that uses this function.
-- The index will need to be dropped before this function can be modified.
return replace(replace(replace(replace(replace(@NUMBER, ' ', ''), '(', ''), ')', ''), '-', ''), '.', '');
end