SoftadminUtil.PersonalIdentityNumber_IsValid

 Show all Hide all

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.

Type: Scalar function
Area of use: General use

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