the following will work if I want to have UNIQUE Users.Name >> INSERT INTO [Users] (Name)
SELECT Names FROM OtherUsers
where OtherUsers.Names not in (select Name from Users)
but if I have an UNIQUE INDEX on Users CREATE UNIQUE INDEX [IX_Users] ON [Users] ([Name],[Category]) ON [PRIMARY]
how can I do it ?
INSERT INTO [Users] (Name, Category)
SELECT Names,Categories FROM OtherUsers
where OtherUsers.Names + OtherUsers.Categories not in (select Name, Category from Users) ?
how can I insert it wih an index on 2 or 3 columns ?