Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
I know most of you have probably seen this error a hundred times and a short answer to it would be change the operator = to in, however, that doesn't seem to work with me.
UPDATE _RS
SET _RS.GroupID = (SELECT ID FROM _RefSkillGroup WHERE Code like '%SKILL_GODBLESS_%')
FROM _RefSkill _RS
JOIN _RefSkillGroup _RSG
ON _RS.GroupID=_RSG.ID
WHERE _RS.ID BETWEEN 33816 AND 33824
UPDATE _RefSkill
SET GroupID = (SELECT ID FROM _RefSkillGroup WHERE Code LIKE '%SKILL_GODBLESS_%')
WHERE ID BETWEEN 33816 AND 33824
That is in _RefSkill:
Service ID GroupID Basic_Code
1 33816 1027 SKILL_GODBLESS_FIRE
1 33817 1028 SKILL_GODBLESS_RED
1 33818 1029 SKILL_GODBLESS_BLUE
1 33819 1030 SKILL_GODBLESS_WHIT
And that is in _RefSkillGroup
ID Code
1038 SKILL_GODBLESS_FIRE
1039 SKILL_GODBLESS_RED
1040 SKILL_GODBLESS_BLUE
1041 SKILL_GODBLESS_WHIT