INSERT INTO dbo.mixedwords (Mixed, MixLen, GoodVa) Values ( SELECT DISTINCT LTRIM(RTRim(mixVa) as NewTerm , MixCnt , ValidVal FROM Sandbox ) Note: All objects are spelled correctly The SELECT query runs if highlighted and executed
A missing closing parenthesis here, too: LTRIM(RTRim(mixVa) Not sure how it would still run if you just highlighted it and executed it.