e
q
u
e
s
t
a
d
e
m
o < back
CLR Reference: SSN
{TOC}
"SSN"
CLR function
<.CLRSQLCLR: function:
SELECT xxxxx(xxx,xxx,xxx)>[dbo].[SSNRandom] (<@ssn, nvarchar(4000)>)
Expected input
<.expectedData: input:9 datadigits type,string rule,(can sample>contain extra characters separators)
Expected output
<.expectedGeneric output:USA dataSSN type, rule, sample>(nvarchar(MAX))
Error handling
<.errorReturns handling>an empty string when passing empty or NULL value.
Fails on invalid SSN format
Example
<.example>SQLCLR:
SELECT [dbo].[SSNRandom] ('987654321')