I have a sql query that works fine until I place it into a string variable and try to execute the string. First the Good Code is below:
INSERT INTO ESOTempTables.dbo.GLPayRunEmpsEarnings (CompanyNum, PRID, VoucherNum, VoidRunIndicator, ekPRV, ekPRL, EarnNum, EarnAmt, Labor4, EmpDept, mydept...