SoftadminUtil.OrganisationNumber_IsValid

Type: Scalar function

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

Note that all valid social security numbers are also valid organisation numbers. This is because companies of type "enskild firma" uses the owners social security number as organisation number.

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

Return value: bit

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

Parameters

@OrgNr mandatory varchar(8000)
The organisation number to validate.

Supported input formats:
GNNNNNNNNK
GNNNNN-NNNK
XXGNNNNNNNNK