0

我将 2012 年参加理赔的操作员的工资提高了 11%,试试

update operator or
September o.sueldo = o.sueldo + (o.sueldo * 0.11)
where exists (select 1 from claim where r.cod_operador r = o.cod_operador
and r.fecha Between '2012-01-01 'and '2012-12-31');

但它显示“错误代码:1241。操作数应包含 1 列”有人知道我该如何解决这些错误吗?

sqlfiddle 在这里:http ://sqlfiddle.com/#!2/b2771

4

2 回答 2

2

你对这个声明做了什么?

这样它至少适合你的桌子:

update operador o
set o.sueldo = o.sueldo + (o.sueldo * 0.11)
where exists (select 1 from reclamo r where r.cod_operador = o.cod_operador
and r.fecha Between '2012-01-01 'and '2012-12-31');

但我不知道它最终是否会做正确的事情......

于 2013-07-31T20:17:40.183 回答
1

我认为您的查询应该是

update operator o
SET o.sueldo = o.sueldo + (o.sueldo * 0.11)
where exists (select 1 from claim where r.cod_operador r = o.cod_operador
and r.fecha Between '2012-01-01 'and '2012-12-31');
于 2013-07-31T20:14:00.667 回答