I am inserting into a table by selecting from another table. I need to set a value based upon one of the column values read. So I need to use a case statement.
See line 12 below. I need help, because syntactically line 12 is not correct. Should I instead replace line 6 with line 12? Can someone help me out please?
1 INSERT INTO smtstage..SMTS_BLLD_L2_STAGE_ASSOC_USERS(
11 el.Num END
12 el.P_Id = (CASE WHEN el.P_ACTIVE <> 1 then 1 ELSE el.P_ACTIVE =2)
FROM EmployeeList el