Not logged in - Login / Register


R
e
q
u
e
s
t

a

d
e
m
o
< back

CLR Reference: Zip Code

"Zip Code"

CLR function

SQLCLR:

SELECT [dbo].[UsaPhoneRandom][dbo].[ZipCodeRandom] (<@usaPhone,(<@ZipCode, nvarchar(4000)>)

Expected input

data:Data: numericValid USA Phoneor (canCanadian containZip separators). Length without separators from 9 to 15 digits.Code

Expected output

Generic USA Phoneor ofCanadian theZip sameCode format(depends ason inputinput) (nvarchar(MAX))

Error handling

Returns an empty string when passing empty or NULL value. Fails on digitsinvalid countzip lesscode than 9 or more than 15format

Example

SQLCLR:

SELECT [dbo].[UsaPhoneRandom][dbo].[ZipCodeRandom] ('898.456.4456')('K1A 0B1')

Download a Trial