Not logged in - Login / Register


View History

CLR Reference: Zip Code

"Zip Code"

CLR function

SQLCLR:

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

Expected input

Data: Valid USA or Canadian Zip Code

Expected output

Generic USA or Canadian Zip Code (depends on input) (nvarchar(MAX))

Error handling

Returns an empty string when passing empty or NULL value. Fails on invalid zip code format

Example

SQLCLR:

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