First of all, comparing IF/CASE statements is just non sense! Why? IF is used when there's actually a logic behind your cases and you have to first match the cases that are most likely to happen first whilst, CASE is used when you are just returning values. So CASE is not better that IF, they are completely different when it comes to their usages.
Now coming to your last insert statement where you used the case to select the SkillID. You totally missed a default case, which is actually just ****** up!
Every time the case statement won't match any of your cases this query is going to throw an exception since _CharSkill isn't designed to accept NULL values. Performance gg wp!
|