I know similar questions has been before but I just couldn't quite understand them, still very new to SQL and wanting to get the solution as well as understanding why it wouldn't work originally.
sql = "UPDATE e " +
"SET " +
"e.Operator = '" + emp.Operator + "', " +
"e.LoginName = '" + emp.Login + "', " +
"e.Active = " + (emp.Active == true ? 1 : 0) + "," +
"e.Position = '" + emp.Position + "', " +
"p.Admin = " + (emp.Permission.Admin == true ? 1 : 0) + "," +
"p.Manager = " + (emp.Permission.Manager == true ? 1 : 0) + "," +
"p.Overtime = " + (emp.Permission.Overtime == true ? 1 : 0) + "," +
"p.TimeInLieu = " + emp.Permission.TimeInLieu + " " +
"FROM Employee e INNER JOIN Permissions p " +
"ON e.PermissionID = p.PermissionID AND e.Operator = '" + employee + "'";
when trying to execute the command I get this error.
The multi-part identifier "p.Admin" could not be bound.
Any help would be greatly received.