SoftadminUtil.PersonalIdentityNumber_IsValid

Type: Scalar function

This function answers the question whether a given string is a formally valid social security number.

The validation also support the non-proper social security numbers known as "samordningsnummer".

The special case of a null-string will give a return value of 0.

Return value: bit

Returns 1 if the social security number is formally valid and 0 otherwise.

Parameters

@SSN mandatory varchar(8000)
The social security number to validate.

Supported input formats:
yymmddNNNK
yymmdd-NNNK
yymmdd+NNNK
YYyymmddNNNK