No unfortunately, subnumbering has only been chosen when the projects has sub projects.
The main project always has 9 characters, the sub project then total 12 characters and the sub-sub project in total 15 characters. Always in this format: 123456789.001.001 / ########.###.###
201801218
201801218.012
201801218.012.001
Can I solve this with something like length is then . . .
SELECT ProjectNo,
CASE
WHEN LEN(ProjectNo) > 12 THEN STUFF(STUFF(ProjectNo, 13, 0, '.'), 10, 0, '.')
WHEN LEN(ProjectNo) > 9 THEN STUFF(ProjectNo, 10, 0, '.')
ELSE CAST(ProjectNo AS varchar(17)) END AS ProjectNoFormatted
FROM ( VALUES(CAST(201801218 AS bigint)), (201801218012), (201801218012001) )
AS x(ProjectNo)