A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Please post table design as DDL, some sample data as DML statement and the expected result.
Is there may be a UserName NULL? A compare on NULL ends in undefined result and so may don't return any result. Filter NULL out =>
INSERT INTO [dbo].[Settings](PropertyField, ValueField, UserName)
SELECT 'ALLOW_WEB_APPROVALS', '1', [Login]
FROM Users
where [Login] not in (Select UserName
from Settings
where PropertyField='ALLOW_WEB_APPROVALS'
and not UserName IS NULL)