Если столбец ID (UserID) таблицы test02 не разрешает NULL, попробуйте эту версию:
CREATE VIEW vw_test2
AS
SELECT tmp1.ID as ParentID
, tmp1.Parent
, tmp2.ID as UserID
, tmp2.UserName
FROM test01 tmp1
JOIN test02 tmp2
on tmp1.ID = tmp2.ID
UNION ALL
SELECT tmp1.ID as ParentID
, tmp1.Parent
, 0 as UserID
, tmp2.UserName
FROM test01 tmp1
LEFT JOIN test02 tmp2
on tmp1.ID = tmp2.ID
WHERE tmp2.ID IS NULL;
GO