e
q
u
e
s
t
a
d
e
m
o < back
CLR Reference: US Phone Nu
{TOC}
"US Phone Nu"
CLR function
SQLCLR:
SELECT [dbo].[UsaPhoneRandom] (<@usaPhone, nvarchar(4000)>)
Expected input
data:Data: numeric USA Phone (can contain separators). Length without separators from- 9 to 1510 digits.
Expected output
Generic USA Phone of the same format as input (nvarchar(MAX))
Error handling
Returns an empty string when passing empty or NULL value.
Fails on digits count less than 9 or more than 1510
Example
SQLCLR:
SELECT [dbo].[UsaPhoneRandom] ('898.456.4456')